Text file src/cmd/go/testdata/vcstest/svn/test1-svn-git.txt

     1  handle svn
     2  
     3  # Note: this repo script does not produce a byte-for-byte copy of the original.
     4  #
     5  # The 'git init' operation in the nested Git repo creates some sample files
     6  # whose contents depend on the exact Git version in use, and the steps we take
     7  # to construct a fake 'git clone' status don't produce some log files that
     8  # a real 'git clone' leaves behind.
     9  #
    10  # However, the repo is probably accurate enough for the tests that need it.
    11  
    12  env GIT_AUTHOR_NAME='Russ Cox'
    13  env GIT_AUTHOR_EMAIL='rsc@golang.org'
    14  env GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME
    15  env GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL
    16  
    17  mkdir db/transactions
    18  mkdir db/txn-protorevs
    19  chmod 0755 hooks/pre-revprop-change
    20  
    21  env ROOT=$PWD
    22  cd .checkout
    23  [GOOS:windows] svn checkout file:///$ROOT .
    24  [!GOOS:windows] svn checkout file://$ROOT .
    25  
    26  cd git-README-only
    27  git init
    28  git config --add core.ignorecase true
    29  git config --add core.precomposeunicode true
    30  
    31  git add README
    32  at 2017-09-22T11:39:03-04:00
    33  git commit -a -m 'README'
    34  git branch -m master
    35  
    36  git rev-parse HEAD
    37  stdout '^7f800d2ac276dd7042ea0e8d7438527d236fd098$'
    38  
    39  	# Fake a clone from an origin repo at this commit.
    40  git remote add origin https://vcs-test.swtch.com/git/README-only
    41  mkdir .git/refs/remotes/origin
    42  echo 'ref: refs/remotes/origin/master'
    43  cp stdout .git/refs/remotes/origin/HEAD
    44  unquote '# pack-refs with: peeled fully-peeled \n7f800d2ac276dd7042ea0e8d7438527d236fd098 refs/remotes/origin/master\n'
    45  cp stdout .git/packed-refs
    46  git branch --set-upstream-to=origin/master
    47  
    48  git add pkg/pkg.go
    49  at 2017-09-22T11:41:28-04:00
    50  git commit -a -m 'add pkg'
    51  
    52  git log --oneline --decorate=short
    53  cmp stdout ../.git-log
    54  
    55  cd ..
    56  svn add git-README-only
    57  svn commit -m 'add modified git-README-only'
    58  svn propset svn:author rsc --revprop -r1
    59  svn propset svn:date 2017-09-22T15:41:54.145716Z --revprop -r1
    60  
    61  svn add pkg.go
    62  svn commit -m 'use git-README-only/pkg'
    63  svn propset svn:author rsc --revprop -r2
    64  svn propset svn:date 2017-09-22T15:49:11.130406Z --revprop -r2
    65  
    66  svn add other
    67  svn commit -m 'add other'
    68  svn propset svn:author rsc --revprop -r3
    69  svn propset svn:date 2017-09-22T16:56:16.665173Z --revprop -r3
    70  
    71  svn add tiny
    72  svn commit -m 'add tiny'
    73  svn propset svn:author rsc --revprop -r4
    74  svn propset svn:date 2017-09-27T17:48:18.350817Z --revprop -r4
    75  
    76  cd git-README-only
    77  git remote set-url origin https://vcs-test.golang.org/git/README-only
    78  cd ..
    79  replace 'vcs-test.swtch.com' 'vcs-test.golang.org' other/pkg.go
    80  replace 'vcs-test.swtch.com' 'vcs-test.golang.org' pkg.go
    81  svn commit -m 'move from vcs-test.swtch.com to vcs-test.golang.org'
    82  svn propset svn:author rsc --revprop -r5
    83  svn propset svn:date 2017-10-04T15:08:26.291877Z --revprop -r5
    84  
    85  svn update
    86  svn log --xml
    87  
    88  [GOOS:windows] replace '\n' '\r\n' .svn-log
    89  cmp stdout .svn-log
    90  
    91  -- .checkout/git-README-only/pkg/pkg.go --
    92  package pkg
    93  const Message = "code not in git-README-only"
    94  -- .checkout/git-README-only/README --
    95  README
    96  -- .checkout/.git-log --
    97  ab9f66b (HEAD -> master) add pkg
    98  7f800d2 (origin/master, origin/HEAD) README
    99  -- .checkout/pkg.go --
   100  package p
   101  
   102  import "vcs-test.swtch.com/go/test1-svn-git/git-README-only/pkg"
   103  
   104  const _ = pkg.Message
   105  -- .checkout/other/pkg.go --
   106  package other
   107  
   108  import _ "vcs-test.swtch.com/go/test1-svn-git/git-README-only/other"
   109  -- .checkout/tiny/tiny.go --
   110  package tiny
   111  -- .checkout/.svn-log --
   112  <?xml version="1.0" encoding="UTF-8"?>
   113  <log>
   114  <logentry
   115     revision="5">
   116  <author>rsc</author>
   117  <date>2017-10-04T15:08:26.291877Z</date>
   118  <msg>move from vcs-test.swtch.com to vcs-test.golang.org</msg>
   119  </logentry>
   120  <logentry
   121     revision="4">
   122  <author>rsc</author>
   123  <date>2017-09-27T17:48:18.350817Z</date>
   124  <msg>add tiny</msg>
   125  </logentry>
   126  <logentry
   127     revision="3">
   128  <author>rsc</author>
   129  <date>2017-09-22T16:56:16.665173Z</date>
   130  <msg>add other</msg>
   131  </logentry>
   132  <logentry
   133     revision="2">
   134  <author>rsc</author>
   135  <date>2017-09-22T15:49:11.130406Z</date>
   136  <msg>use git-README-only/pkg</msg>
   137  </logentry>
   138  <logentry
   139     revision="1">
   140  <author>rsc</author>
   141  <date>2017-09-22T15:41:54.145716Z</date>
   142  <msg>add modified git-README-only</msg>
   143  </logentry>
   144  </log>
   145  -- conf/authz --
   146  -- conf/passwd --
   147  -- conf/svnserve.conf --
   148  -- db/current --
   149  0
   150  -- db/format --
   151  6
   152  layout sharded 1000
   153  -- db/fs-type --
   154  fsfs
   155  -- db/fsfs.conf --
   156  -- db/min-unpacked-rev --
   157  0
   158  -- db/revprops/0/0 --
   159  K 8
   160  svn:date
   161  V 27
   162  2017-09-22T01:11:53.895835Z
   163  END
   164  -- db/revs/0/0 --
   165  PLAIN
   166  END
   167  ENDREP
   168  id: 0.0.r0/17
   169  type: dir
   170  count: 0
   171  text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
   172  cpath: /
   173  
   174  
   175  17 107
   176  -- db/txn-current --
   177  0
   178  -- db/txn-current-lock --
   179  -- db/uuid --
   180  53cccb44-0fca-40a2-b0c5-acaf9e75039a
   181  -- db/write-lock --
   182  -- format --
   183  5
   184  -- hooks/pre-revprop-change --
   185  #!/bin/sh
   186  
   187  -- hooks/pre-revprop-change.bat --
   188  @exit
   189  

View as plain text