@matheusbsbs / matheus-bagliano / commits / ccb6b6f5b5
Fork 0

t910*: s/repo-config/config/g; poke around possible race conditions

Some of the repo-config => config renaming missed the git-svn tests; so I'm just renaming them to be consisten with the rest of the modern git. Also, some of the newer tests didn't have 'poke' in them to workaround race conditions on fast machines. This adds places where they can _possibly_ occur; but I don't have fast enough hardware to trigger them. Signed-off-by: Eric Wong <normalperson@yhbt.net>

Eric Wong committed Feb 13, 2007 at 17:38 UTC ccb6b6f5b50bb32f90222a3e801a1901bf0b5657
5 files changed +23 -15
t/t9100-git-svn-basic.sh
+4 -4
@@ -214,7 +214,7 @@ EOF
214 test_expect_success "$name" "diff -u a expected"
215
216 test_expect_failure 'exit if remote refs are ambigious' "
217 - git-repo-config --add svn-remote.svn.fetch \
217 + git-config --add svn-remote.svn.fetch \
218 bar:refs/remotes/git-svn &&
219 git-svn migrate
220 "
@@ -222,7 +222,7 @@ test_expect_failure 'exit if remote refs are ambigious' "
222 test_expect_failure 'exit if init-ing a would clobber a URL' "
223 svnadmin create ${PWD}/svnrepo2 &&
224 svn mkdir -m 'mkdir bar' ${svnrepo}2/bar &&
225 - git-repo-config --unset svn-remote.svn.fetch \
225 + git-config --unset svn-remote.svn.fetch \
226 '^bar:refs/remotes/git-svn$' &&
227 git-svn init ${svnrepo}2/bar
228 "
@@ -230,9 +230,9 @@ test_expect_failure 'exit if init-ing a would clobber a URL' "
230 test_expect_success \
231 'init allows us to connect to another directory in the same repo' "
232 git-svn init -i bar $svnrepo/bar &&
233 - git repo-config --get svn-remote.svn.fetch \
233 + git config --get svn-remote.svn.fetch \
234 '^bar:refs/remotes/bar$' &&
235 - git repo-config --get svn-remote.svn.fetch \
235 + git config --get svn-remote.svn.fetch \
236 '^:refs/remotes/git-svn$'
237 "
238
t/t9104-git-svn-follow-parent.sh
+5 -4
@@ -39,10 +39,10 @@ test_expect_success 'init and fetch a moved directory' "
39 "
40
41 test_expect_success 'init and fetch from one svn-remote' "
42 - git-repo-config svn-remote.svn.url $svnrepo &&
43 - git-repo-config --add svn-remote.svn.fetch \
42 + git-config svn-remote.svn.url $svnrepo &&
43 + git-config --add svn-remote.svn.fetch \
44 trunk:refs/remotes/svn/trunk &&
45 - git-repo-config --add svn-remote.svn.fetch \
45 + git-config --add svn-remote.svn.fetch \
46 thunk:refs/remotes/svn/thunk &&
47 git-svn fetch -i svn/thunk &&
48 test \"\`git-rev-parse --verify refs/remotes/svn/trunk\`\" \
@@ -54,7 +54,7 @@ test_expect_success 'init and fetch from one svn-remote' "
54 test_expect_success 'follow deleted parent' "
55 svn cp -m 'resurrecting trunk as junk' \
56 -r2 $svnrepo/trunk $svnrepo/junk &&
57 - git-repo-config --add svn-remote.svn.fetch \
57 + git-config --add svn-remote.svn.fetch \
58 junk:refs/remotes/svn/junk &&
59 git-svn fetch -i svn/thunk &&
60 git-svn fetch -i svn/junk &&
@@ -124,6 +124,7 @@ test_expect_success 'follow-parent avoids deleting relevant info' "
124 svn mv t native/t &&
125 for i in a b c; do svn mv \$i.pm native/\$i.pm; done &&
126 echo z >> native/t/c.t &&
127 + poke native/t/c.t &&
128 svn commit -m 'reorg test' &&
129 cd .. &&
130 git-svn init -i r9270-t \
t/t9107-git-svn-migrate.sh
+7 -7
@@ -34,14 +34,14 @@ test_expect_success 'initialize old-style (v0) git-svn layout' "
34 ! test -d $GIT_DIR/git-svn &&
35 git-rev-parse --verify refs/remotes/git-svn^0 &&
36 git-rev-parse --verify refs/remotes/svn^0 &&
37 - test \`git repo-config --get svn-remote.svn.url\` = '$svnrepo' &&
38 - test \`git repo-config --get svn-remote.svn.fetch\` = \
37 + test \`git config --get svn-remote.svn.url\` = '$svnrepo' &&
38 + test \`git config --get svn-remote.svn.fetch\` = \
39 ':refs/remotes/git-svn'
40 "
41
42 test_expect_success 'initialize a multi-repository repo' "
43 git-svn multi-init $svnrepo -T trunk -t tags -b branches &&
44 - git-repo-config --get-all svn-remote.svn.fetch > fetch.out &&
44 + git-config --get-all svn-remote.svn.fetch > fetch.out &&
45 grep '^trunk:refs/remotes/trunk$' fetch.out &&
46 test -n \"\`git-config --get svn-remote.svn.branches \
47 '^branches/\*:refs/remotes/\*$'\`\" &&
@@ -73,8 +73,8 @@ test_expect_success 'multi-fetch works on partial urls + paths' "
73 "
74
75 test_expect_success 'migrate --minimize on old multi-inited layout' "
76 - git repo-config --unset-all svn-remote.svn.fetch &&
77 - git repo-config --unset-all svn-remote.svn.url &&
76 + git config --unset-all svn-remote.svn.fetch &&
77 + git config --unset-all svn-remote.svn.url &&
78 rm -rf $GIT_DIR/svn &&
79 for i in \`cat fetch.out\`; do
80 path=\`expr \$i : '\\([^:]*\\):.*$'\`
@@ -85,8 +85,8 @@ test_expect_success 'migrate --minimize on old multi-inited layout' "
85 echo $svnrepo\$path > $GIT_DIR/svn/\$ref/info/url ) || exit 1;
86 done &&
87 git-svn migrate --minimize &&
88 - test -z \"\`git-repo-config -l |grep -v '^svn-remote\.git-svn\.'\`\" &&
89 - git-repo-config --get-all svn-remote.svn.fetch > fetch.out &&
88 + test -z \"\`git-config -l |grep -v '^svn-remote\.git-svn\.'\`\" &&
89 + git-config --get-all svn-remote.svn.fetch > fetch.out &&
90 grep '^trunk:refs/remotes/trunk$' fetch.out &&
91 grep '^branches/a:refs/remotes/a$' fetch.out &&
92 grep '^branches/b:refs/remotes/b$' fetch.out &&
t/t9108-git-svn-glob.sh
+5
@@ -23,14 +23,19 @@ test_expect_success 'test refspec globbing' "
23 svn commit -m 'start a new branch' &&
24 svn up &&
25 echo 'hi' >> branches/start/src/b/readme &&
26 + poke branches/start/src/b/readme &&
27 echo 'hey' >> branches/start/src/a/readme &&
28 + poke branches/start/src/a/readme &&
29 svn commit -m 'hi' &&
30 svn up &&
31 svn cp branches/start tags/end &&
32 echo 'bye' >> tags/end/src/b/readme &&
33 + poke tags/end/src/b/readme &&
34 echo 'aye' >> tags/end/src/a/readme &&
35 + poke tags/end/src/a/readme &&
36 svn commit -m 'the end' &&
37 echo 'byebye' >> tags/end/src/b/readme &&
38 + poke tags/end/src/b/readme &&
39 svn commit -m 'nothing to see here'
40 cd .. &&
41 git config --add svn-remote.svn.url $svnrepo &&
t/t9109-git-svn-svk-mirrorpaths.sh
+2
@@ -55,11 +55,13 @@ test_expect_success 'initialize repo' "
55
56 svn up &&
57 echo random untested feature >> mirror/foobar/trunk/readme &&
58 + poke mirror/foobar/trunk/readme &&
59 svn commit -m 'add a c00l feature to trunk' &&
60 svn ps -r 5 --revprop svm:headrev $uuid:3 $svnrepo &&
61
62 svn up &&
63 echo bug fix >> mirror/foobar/branches/silly/readme &&
64 + poke mirror/foobar/branches/silly/readme &&
65 svn commit -m 'fix a bug' &&
66 svn ps -r 6 --revprop svm:headrev $uuid:4 $svnrepo &&
67