...

Text file src/cmd/go/testdata/vcstest/svn/test1-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
    26cd git-README-only
    27git init
    28git config --add core.ignorecase true
    29git config --add core.precomposeunicode true
    30
    31git add README
    32at 2017-09-22T11:39:03-04:00
    33git commit -a -m 'README'
    34git branch -m master
    35
    36git rev-parse HEAD
    37stdout '^7f800d2ac276dd7042ea0e8d7438527d236fd098$'
    38
    39	# Fake a clone from an origin repo at this commit.
    40git remote add origin https://vcs-test.swtch.com/git/README-only
    41mkdir .git/refs/remotes/origin
    42echo 'ref: refs/remotes/origin/master'
    43cp stdout .git/refs/remotes/origin/HEAD
    44unquote '# pack-refs with: peeled fully-peeled \n7f800d2ac276dd7042ea0e8d7438527d236fd098 refs/remotes/origin/master\n'
    45cp stdout .git/packed-refs
    46git branch --set-upstream-to=origin/master
    47
    48git add pkg/pkg.go
    49at 2017-09-22T11:41:28-04:00
    50git commit -a -m 'add pkg'
    51
    52git log --oneline --decorate=short
    53cmp stdout ../.git-log
    54
    55cd ..
    56svn add git-README-only
    57svn commit -m 'add modified git-README-only'
    58svn propset svn:author rsc --revprop -r1
    59svn propset svn:date 2017-09-22T15:41:54.145716Z --revprop -r1
    60
    61svn add pkg.go
    62svn commit -m 'use git-README-only/pkg'
    63svn propset svn:author rsc --revprop -r2
    64svn propset svn:date 2017-09-22T15:49:11.130406Z --revprop -r2
    65
    66svn add other
    67svn commit -m 'add other'
    68svn propset svn:author rsc --revprop -r3
    69svn propset svn:date 2017-09-22T16:56:16.665173Z --revprop -r3
    70
    71svn add tiny
    72svn commit -m 'add tiny'
    73svn propset svn:author rsc --revprop -r4
    74svn propset svn:date 2017-09-27T17:48:18.350817Z --revprop -r4
    75
    76cd git-README-only
    77git remote set-url origin https://vcs-test.golang.org/git/README-only
    78cd ..
    79replace 'vcs-test.swtch.com' 'vcs-test.golang.org' other/pkg.go
    80replace 'vcs-test.swtch.com' 'vcs-test.golang.org' pkg.go
    81svn commit -m 'move from vcs-test.swtch.com to vcs-test.golang.org'
    82svn propset svn:author rsc --revprop -r5
    83svn propset svn:date 2017-10-04T15:08:26.291877Z --revprop -r5
    84
    85svn update
    86svn log --xml
    87
    88[GOOS:windows] replace '\n' '\r\n' .svn-log
    89cmp stdout .svn-log
    90
    91-- .checkout/git-README-only/pkg/pkg.go --
    92package pkg
    93const Message = "code not in git-README-only"
    94-- .checkout/git-README-only/README --
    95README
    96-- .checkout/.git-log --
    97ab9f66b (HEAD -> master) add pkg
    987f800d2 (origin/master, origin/HEAD) README
    99-- .checkout/pkg.go --
   100package p
   101
   102import "vcs-test.swtch.com/go/test1-svn-git/git-README-only/pkg"
   103
   104const _ = pkg.Message
   105-- .checkout/other/pkg.go --
   106package other
   107
   108import _ "vcs-test.swtch.com/go/test1-svn-git/git-README-only/other"
   109-- .checkout/tiny/tiny.go --
   110package 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 --
   1490
   150-- db/format --
   1516
   152layout sharded 1000
   153-- db/fs-type --
   154fsfs
   155-- db/fsfs.conf --
   156-- db/min-unpacked-rev --
   1570
   158-- db/revprops/0/0 --
   159K 8
   160svn:date
   161V 27
   1622017-09-22T01:11:53.895835Z
   163END
   164-- db/revs/0/0 --
   165PLAIN
   166END
   167ENDREP
   168id: 0.0.r0/17
   169type: dir
   170count: 0
   171text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
   172cpath: /
   173
   174
   17517 107
   176-- db/txn-current --
   1770
   178-- db/txn-current-lock --
   179-- db/uuid --
   18053cccb44-0fca-40a2-b0c5-acaf9e75039a
   181-- db/write-lock --
   182-- format --
   1835
   184-- hooks/pre-revprop-change --
   185#!/bin/sh
   186
   187-- hooks/pre-revprop-change.bat --
   188@exit

View as plain text