mirror of
https://github.com/golang/go
synced 2024-11-16 20:04:52 -07:00
cmd/go: fix svn vctest on Windows and make them timezone agnostic
This CL updates svn vctest so they work on Windows. Side effect is that svn logs are no longer timezone dependant, as this updated the `svn log` command to format logs using XML, which contain UTC dates instead of local dates. Therefore it supersedes https://go-review.googlesource.com/c/go/+/447795. Fixes #56555 Fixes #56527 Change-Id: I5a654fd0a0f741e0a8a6ca7021ad699c07b974d6 Reviewed-on: https://go-review.googlesource.com/c/go/+/447935 Reviewed-by: Benny Siegert <bsiegert@gmail.com> Auto-Submit: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
This commit is contained in:
parent
4b43b74171
commit
41be62e168
@ -128,6 +128,7 @@ func scriptEnviron(homeDir string) []string {
|
||||
tempEnvName(),
|
||||
"SYSTEMROOT", // must be preserved on Windows to find DLLs; golang.org/issue/25210
|
||||
"WINDIR", // must be preserved on Windows to be able to run PowerShell command; golang.org/issue/30711
|
||||
"ComSpec", // must be preserved on Windows to be able to run Batch files; golang.org/issue/56555
|
||||
"DYLD_LIBRARY_PATH", // must be preserved on macOS systems to find shared libraries
|
||||
"LD_LIBRARY_PATH", // must be preserved on Unix systems to find shared libraries
|
||||
"LIBRARY_PATH", // allow override of non-standard static library paths
|
||||
|
28
src/cmd/go/testdata/vcstest/svn/hello.txt
vendored
28
src/cmd/go/testdata/vcstest/svn/hello.txt
vendored
@ -1,14 +1,13 @@
|
||||
handle svn
|
||||
|
||||
env TZ='America/New_York'
|
||||
|
||||
mkdir db/transactions
|
||||
mkdir db/txn-protorevs
|
||||
chmod 0755 hooks/pre-revprop-change
|
||||
|
||||
env ROOT=$PWD
|
||||
cd .checkout
|
||||
svn checkout file://$ROOT .
|
||||
[GOOS:windows] svn checkout file:///$ROOT .
|
||||
[!GOOS:windows] svn checkout file://$ROOT .
|
||||
|
||||
svn add hello.go
|
||||
svn commit --file MSG
|
||||
@ -16,7 +15,9 @@ svn propset svn:author 'rsc' --revprop -r1
|
||||
svn propset svn:date '2017-09-22T01:12:45.861368Z' --revprop -r1
|
||||
|
||||
svn update
|
||||
svn log
|
||||
svn log --xml
|
||||
|
||||
[GOOS:windows] replace '\n' '\r\n' .svn-log
|
||||
cmp stdout .svn-log
|
||||
|
||||
-- .checkout/MSG --
|
||||
@ -29,13 +30,17 @@ func main() {
|
||||
println("hello, world")
|
||||
}
|
||||
-- .checkout/.svn-log --
|
||||
------------------------------------------------------------------------
|
||||
r1 | rsc | 2017-09-21 21:12:45 -0400 (Thu, 21 Sep 2017) | 3 lines
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<log>
|
||||
<logentry
|
||||
revision="1">
|
||||
<author>rsc</author>
|
||||
<date>2017-09-22T01:12:45.861368Z</date>
|
||||
<msg>hello world
|
||||
|
||||
hello world
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
</msg>
|
||||
</logentry>
|
||||
</log>
|
||||
-- conf/authz --
|
||||
-- conf/passwd --
|
||||
-- conf/svnserve.conf --
|
||||
@ -77,3 +82,6 @@ cpath: /
|
||||
5
|
||||
-- hooks/pre-revprop-change --
|
||||
#!/bin/sh
|
||||
|
||||
-- hooks/pre-revprop-change.bat --
|
||||
@exit
|
||||
|
@ -13,7 +13,6 @@ 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
|
||||
env TZ='America/New_York'
|
||||
|
||||
mkdir db/transactions
|
||||
mkdir db/txn-protorevs
|
||||
@ -21,7 +20,8 @@ chmod 0755 hooks/pre-revprop-change
|
||||
|
||||
env ROOT=$PWD
|
||||
cd .checkout
|
||||
svn checkout file://$ROOT .
|
||||
[GOOS:windows] svn checkout file:///$ROOT .
|
||||
[!GOOS:windows] svn checkout file://$ROOT .
|
||||
|
||||
cd git-README-only
|
||||
git init
|
||||
@ -83,7 +83,9 @@ svn propset svn:author rsc --revprop -r5
|
||||
svn propset svn:date 2017-10-04T15:08:26.291877Z --revprop -r5
|
||||
|
||||
svn update
|
||||
svn log
|
||||
svn log --xml
|
||||
|
||||
[GOOS:windows] replace '\n' '\r\n' .svn-log
|
||||
cmp stdout .svn-log
|
||||
|
||||
-- .checkout/git-README-only/pkg/pkg.go --
|
||||
@ -107,27 +109,39 @@ import _ "vcs-test.swtch.com/go/test1-svn-git/git-README-only/other"
|
||||
-- .checkout/tiny/tiny.go --
|
||||
package tiny
|
||||
-- .checkout/.svn-log --
|
||||
------------------------------------------------------------------------
|
||||
r5 | rsc | 2017-10-04 11:08:26 -0400 (Wed, 04 Oct 2017) | 1 line
|
||||
|
||||
move from vcs-test.swtch.com to vcs-test.golang.org
|
||||
------------------------------------------------------------------------
|
||||
r4 | rsc | 2017-09-27 13:48:18 -0400 (Wed, 27 Sep 2017) | 1 line
|
||||
|
||||
add tiny
|
||||
------------------------------------------------------------------------
|
||||
r3 | rsc | 2017-09-22 12:56:16 -0400 (Fri, 22 Sep 2017) | 1 line
|
||||
|
||||
add other
|
||||
------------------------------------------------------------------------
|
||||
r2 | rsc | 2017-09-22 11:49:11 -0400 (Fri, 22 Sep 2017) | 1 line
|
||||
|
||||
use git-README-only/pkg
|
||||
------------------------------------------------------------------------
|
||||
r1 | rsc | 2017-09-22 11:41:54 -0400 (Fri, 22 Sep 2017) | 1 line
|
||||
|
||||
add modified git-README-only
|
||||
------------------------------------------------------------------------
|
||||
<?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 --
|
||||
@ -169,3 +183,6 @@ cpath: /
|
||||
5
|
||||
-- hooks/pre-revprop-change --
|
||||
#!/bin/sh
|
||||
|
||||
-- hooks/pre-revprop-change.bat --
|
||||
@exit
|
||||
|
@ -13,7 +13,6 @@ 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
|
||||
env TZ='America/New_York'
|
||||
|
||||
mkdir db/transactions
|
||||
mkdir db/txn-protorevs
|
||||
@ -21,7 +20,8 @@ chmod 0755 hooks/pre-revprop-change
|
||||
|
||||
env ROOT=$PWD
|
||||
cd .checkout
|
||||
svn checkout file://$ROOT .
|
||||
[GOOS:windows] svn checkout file:///$ROOT .
|
||||
[!GOOS:windows] svn checkout file://$ROOT .
|
||||
|
||||
git init
|
||||
git config --add core.ignorecase true
|
||||
@ -69,7 +69,9 @@ svn propset svn:author rsc --revprop -r3
|
||||
svn propset svn:date 2017-10-04T15:09:35.963034Z --revprop -r3
|
||||
|
||||
svn update
|
||||
svn log
|
||||
svn log --xml
|
||||
|
||||
[GOOS:windows] replace '\n' '\r\n' .svn-log
|
||||
cmp stdout .svn-log
|
||||
|
||||
-- .checkout/.git-log --
|
||||
@ -85,19 +87,27 @@ README
|
||||
-- .checkout/p1/p1.go --
|
||||
package p1
|
||||
-- .checkout/.svn-log --
|
||||
------------------------------------------------------------------------
|
||||
r3 | rsc | 2017-10-04 11:09:35 -0400 (Wed, 04 Oct 2017) | 1 line
|
||||
|
||||
move from vcs-test.swtch.com to vcs-test.golang.org
|
||||
------------------------------------------------------------------------
|
||||
r2 | rsc | 2017-09-27 14:16:14 -0400 (Wed, 27 Sep 2017) | 1 line
|
||||
|
||||
add p1
|
||||
------------------------------------------------------------------------
|
||||
r1 | rsc | 2017-09-27 14:00:52 -0400 (Wed, 27 Sep 2017) | 1 line
|
||||
|
||||
git
|
||||
------------------------------------------------------------------------
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<log>
|
||||
<logentry
|
||||
revision="3">
|
||||
<author>rsc</author>
|
||||
<date>2017-10-04T15:09:35.963034Z</date>
|
||||
<msg>move from vcs-test.swtch.com to vcs-test.golang.org</msg>
|
||||
</logentry>
|
||||
<logentry
|
||||
revision="2">
|
||||
<author>rsc</author>
|
||||
<date>2017-09-27T18:16:14.650893Z</date>
|
||||
<msg>add p1</msg>
|
||||
</logentry>
|
||||
<logentry
|
||||
revision="1">
|
||||
<author>rsc</author>
|
||||
<date>2017-09-27T18:00:52.201719Z</date>
|
||||
<msg>git</msg>
|
||||
</logentry>
|
||||
</log>
|
||||
-- conf/authz --
|
||||
-- conf/passwd --
|
||||
-- conf/svnserve.conf --
|
||||
@ -139,3 +149,6 @@ cpath: /
|
||||
5
|
||||
-- hooks/pre-revprop-change --
|
||||
#!/bin/sh
|
||||
|
||||
-- hooks/pre-revprop-change.bat --
|
||||
@exit
|
||||
|
Loading…
Reference in New Issue
Block a user