...

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

Documentation: cmd/go/testdata/vcstest/svn

     1handle 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
    12env GIT_AUTHOR_NAME='Russ Cox'
    13env GIT_AUTHOR_EMAIL='rsc@golang.org'
    14env GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME
    15env GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL
    16
    17mkdir db/transactions
    18mkdir db/txn-protorevs
    19chmod 0755 hooks/pre-revprop-change
    20
    21env ROOT=$PWD
    22cd .checkout
    23[GOOS:windows] svn checkout file:///$ROOT .
    24[!GOOS:windows] svn checkout file://$ROOT .
    25
    26git init
    27git config --add core.ignorecase true
    28git config --add core.precomposeunicode true
    29
    30git add README
    31at 2017-09-22T11:39:03-04:00
    32git commit -a -m 'README'
    33git branch -m master
    34
    35git rev-parse HEAD
    36stdout '^7f800d2ac276dd7042ea0e8d7438527d236fd098$'
    37
    38	# Fake a clone from an origin repo at this commit.
    39git remote add origin https://vcs-test.swtch.com/git/README-only
    40mkdir .git/refs/remotes/origin
    41echo 'ref: refs/remotes/origin/master'
    42cp stdout .git/refs/remotes/origin/HEAD
    43unquote '# pack-refs with: peeled fully-peeled \n7f800d2ac276dd7042ea0e8d7438527d236fd098 refs/remotes/origin/master\n'
    44cp stdout .git/packed-refs
    45git branch --set-upstream-to=origin/master
    46
    47git add pkg/pkg.go
    48at 2017-09-22T11:41:28-04:00
    49git commit -a -m 'add pkg'
    50
    51git log --oneline --decorate=short
    52cmp stdout .git-log
    53
    54rm README
    55
    56svn add .git pkg
    57svn commit -m 'git'
    58svn propset svn:author rsc --revprop -r1
    59svn propset svn:date 2017-09-27T18:00:52.201719Z --revprop -r1
    60
    61svn add p1
    62svn commit -m 'add p1'
    63svn propset svn:author rsc --revprop -r2
    64svn propset svn:date 2017-09-27T18:16:14.650893Z --revprop -r2
    65
    66git remote set-url origin https://vcs-test.golang.org/git/README-only
    67svn commit -m 'move from vcs-test.swtch.com to vcs-test.golang.org'
    68svn propset svn:author rsc --revprop -r3
    69svn propset svn:date 2017-10-04T15:09:35.963034Z --revprop -r3
    70
    71svn update
    72svn log --xml
    73
    74[GOOS:windows] replace '\n' '\r\n' .svn-log
    75cmp stdout .svn-log
    76
    77-- .checkout/.git-log --
    78ab9f66b (HEAD -> master) add pkg
    797f800d2 (origin/master, origin/HEAD) README
    80-- .checkout/p1/p1.go --
    81package p1
    82-- .checkout/pkg/pkg.go --
    83package pkg
    84const Message = "code not in git-README-only"
    85-- .checkout/README --
    86README
    87-- .checkout/p1/p1.go --
    88package p1
    89-- .checkout/.svn-log --
    90<?xml version="1.0" encoding="UTF-8"?>
    91<log>
    92<logentry
    93   revision="3">
    94<author>rsc</author>
    95<date>2017-10-04T15:09:35.963034Z</date>
    96<msg>move from vcs-test.swtch.com to vcs-test.golang.org</msg>
    97</logentry>
    98<logentry
    99   revision="2">
   100<author>rsc</author>
   101<date>2017-09-27T18:16:14.650893Z</date>
   102<msg>add p1</msg>
   103</logentry>
   104<logentry
   105   revision="1">
   106<author>rsc</author>
   107<date>2017-09-27T18:00:52.201719Z</date>
   108<msg>git</msg>
   109</logentry>
   110</log>
   111-- conf/authz --
   112-- conf/passwd --
   113-- conf/svnserve.conf --
   114-- db/current --
   1150
   116-- db/format --
   1176
   118layout sharded 1000
   119-- db/fs-type --
   120fsfs
   121-- db/fsfs.conf --
   122-- db/min-unpacked-rev --
   1230
   124-- db/revprops/0/0 --
   125K 8
   126svn:date
   127V 27
   1282017-09-22T01:11:53.895835Z
   129END
   130-- db/revs/0/0 --
   131PLAIN
   132END
   133ENDREP
   134id: 0.0.r0/17
   135type: dir
   136count: 0
   137text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
   138cpath: /
   139
   140
   14117 107
   142-- db/txn-current --
   1430
   144-- db/txn-current-lock --
   145-- db/uuid --
   14653cccb44-0fca-40a2-b0c5-acaf9e75039a
   147-- db/write-lock --
   148-- format --
   1495
   150-- hooks/pre-revprop-change --
   151#!/bin/sh
   152
   153-- hooks/pre-revprop-change.bat --
   154@exit

View as plain text