diff options
Diffstat (limited to 'src/cmd/go/testdata/vcstest/svn/test1-svn-git.txt')
-rw-r--r-- | src/cmd/go/testdata/vcstest/svn/test1-svn-git.txt | 188 |
1 files changed, 188 insertions, 0 deletions
diff --git a/src/cmd/go/testdata/vcstest/svn/test1-svn-git.txt b/src/cmd/go/testdata/vcstest/svn/test1-svn-git.txt new file mode 100644 index 0000000..2b94201 --- /dev/null +++ b/src/cmd/go/testdata/vcstest/svn/test1-svn-git.txt @@ -0,0 +1,188 @@ +handle svn + +# Note: this repo script does not produce a byte-for-byte copy of the original. +# +# The 'git init' operation in the nested Git repo creates some sample files +# whose contents depend on the exact Git version in use, and the steps we take +# to construct a fake 'git clone' status don't produce some log files that +# a real 'git clone' leaves behind. +# +# However, the repo is probably accurate enough for the tests that need it. + +env GIT_AUTHOR_NAME='Russ Cox' +env GIT_AUTHOR_EMAIL='rsc@golang.org' +env GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME +env GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL + +mkdir db/transactions +mkdir db/txn-protorevs +chmod 0755 hooks/pre-revprop-change + +env ROOT=$PWD +cd .checkout +[GOOS:windows] svn checkout file:///$ROOT . +[!GOOS:windows] svn checkout file://$ROOT . + +cd git-README-only +git init +git config --add core.ignorecase true +git config --add core.precomposeunicode true + +git add README +at 2017-09-22T11:39:03-04:00 +git commit -a -m 'README' +git branch -m master + +git rev-parse HEAD +stdout '^7f800d2ac276dd7042ea0e8d7438527d236fd098$' + + # Fake a clone from an origin repo at this commit. +git remote add origin https://vcs-test.swtch.com/git/README-only +mkdir .git/refs/remotes/origin +echo 'ref: refs/remotes/origin/master' +cp stdout .git/refs/remotes/origin/HEAD +unquote '# pack-refs with: peeled fully-peeled \n7f800d2ac276dd7042ea0e8d7438527d236fd098 refs/remotes/origin/master\n' +cp stdout .git/packed-refs +git branch --set-upstream-to=origin/master + +git add pkg/pkg.go +at 2017-09-22T11:41:28-04:00 +git commit -a -m 'add pkg' + +git log --oneline --decorate=short +cmp stdout ../.git-log + +cd .. +svn add git-README-only +svn commit -m 'add modified git-README-only' +svn propset svn:author rsc --revprop -r1 +svn propset svn:date 2017-09-22T15:41:54.145716Z --revprop -r1 + +svn add pkg.go +svn commit -m 'use git-README-only/pkg' +svn propset svn:author rsc --revprop -r2 +svn propset svn:date 2017-09-22T15:49:11.130406Z --revprop -r2 + +svn add other +svn commit -m 'add other' +svn propset svn:author rsc --revprop -r3 +svn propset svn:date 2017-09-22T16:56:16.665173Z --revprop -r3 + +svn add tiny +svn commit -m 'add tiny' +svn propset svn:author rsc --revprop -r4 +svn propset svn:date 2017-09-27T17:48:18.350817Z --revprop -r4 + +cd git-README-only +git remote set-url origin https://vcs-test.golang.org/git/README-only +cd .. +replace 'vcs-test.swtch.com' 'vcs-test.golang.org' other/pkg.go +replace 'vcs-test.swtch.com' 'vcs-test.golang.org' pkg.go +svn commit -m 'move from vcs-test.swtch.com to vcs-test.golang.org' +svn propset svn:author rsc --revprop -r5 +svn propset svn:date 2017-10-04T15:08:26.291877Z --revprop -r5 + +svn update +svn log --xml + +[GOOS:windows] replace '\n' '\r\n' .svn-log +cmp stdout .svn-log + +-- .checkout/git-README-only/pkg/pkg.go -- +package pkg +const Message = "code not in git-README-only" +-- .checkout/git-README-only/README -- +README +-- .checkout/.git-log -- +ab9f66b (HEAD -> master) add pkg +7f800d2 (origin/master, origin/HEAD) README +-- .checkout/pkg.go -- +package p + +import "vcs-test.swtch.com/go/test1-svn-git/git-README-only/pkg" + +const _ = pkg.Message +-- .checkout/other/pkg.go -- +package other + +import _ "vcs-test.swtch.com/go/test1-svn-git/git-README-only/other" +-- .checkout/tiny/tiny.go -- +package tiny +-- .checkout/.svn-log -- +<?xml version="1.0" encoding="UTF-8"?> +<log> +<logentry + revision="5"> +<author>rsc</author> +<date>2017-10-04T15:08:26.291877Z</date> +<msg>move from vcs-test.swtch.com to vcs-test.golang.org</msg> +</logentry> +<logentry + revision="4"> +<author>rsc</author> +<date>2017-09-27T17:48:18.350817Z</date> +<msg>add tiny</msg> +</logentry> +<logentry + revision="3"> +<author>rsc</author> +<date>2017-09-22T16:56:16.665173Z</date> +<msg>add other</msg> +</logentry> +<logentry + revision="2"> +<author>rsc</author> +<date>2017-09-22T15:49:11.130406Z</date> +<msg>use git-README-only/pkg</msg> +</logentry> +<logentry + revision="1"> +<author>rsc</author> +<date>2017-09-22T15:41:54.145716Z</date> +<msg>add modified git-README-only</msg> +</logentry> +</log> +-- conf/authz -- +-- conf/passwd -- +-- conf/svnserve.conf -- +-- db/current -- +0 +-- db/format -- +6 +layout sharded 1000 +-- db/fs-type -- +fsfs +-- db/fsfs.conf -- +-- db/min-unpacked-rev -- +0 +-- db/revprops/0/0 -- +K 8 +svn:date +V 27 +2017-09-22T01:11:53.895835Z +END +-- db/revs/0/0 -- +PLAIN +END +ENDREP +id: 0.0.r0/17 +type: dir +count: 0 +text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e +cpath: / + + +17 107 +-- db/txn-current -- +0 +-- db/txn-current-lock -- +-- db/uuid -- +53cccb44-0fca-40a2-b0c5-acaf9e75039a +-- db/write-lock -- +-- format -- +5 +-- hooks/pre-revprop-change -- +#!/bin/sh + +-- hooks/pre-revprop-change.bat -- +@exit |