diff options
Diffstat (limited to 't/t9104-git-svn-follow-parent.sh')
-rwxr-xr-x | t/t9104-git-svn-follow-parent.sh | 80 |
1 files changed, 44 insertions, 36 deletions
diff --git a/t/t9104-git-svn-follow-parent.sh b/t/t9104-git-svn-follow-parent.sh index bbfd7f4793..f7f3c5ab8e 100755 --- a/t/t9104-git-svn-follow-parent.sh +++ b/t/t9104-git-svn-follow-parent.sh @@ -8,22 +8,24 @@ test_description='git svn fetching' test_expect_success 'initialize repo' ' mkdir import && - cd import && - mkdir -p trunk && - echo hello > trunk/readme && - svn_cmd import -m "initial" . "$svnrepo" && - cd .. && + ( + cd import && + mkdir -p trunk && + echo hello >trunk/readme && + svn_cmd import -m "initial" . "$svnrepo" + ) && svn_cmd co "$svnrepo" wc && - cd wc && - echo world >> trunk/readme && - poke trunk/readme && - svn_cmd commit -m "another commit" && - svn_cmd up && - svn_cmd mv trunk thunk && - echo goodbye >> thunk/readme && - poke thunk/readme && - svn_cmd commit -m "bye now" && - cd .. + ( + cd wc && + echo world >>trunk/readme && + poke trunk/readme && + svn_cmd commit -m "another commit" && + svn_cmd up && + svn_cmd mv trunk thunk && + echo goodbye >>thunk/readme && + poke thunk/readme && + svn_cmd commit -m "bye now" + ) ' test_expect_success 'init and fetch a moved directory' ' @@ -83,16 +85,17 @@ test_expect_success 'follow larger parent' ' ' test_expect_success 'follow higher-level parent' ' - svn mkdir -m "follow higher-level parent" "$svnrepo"/blob && - svn co "$svnrepo"/blob blob && - cd blob && - echo hi > hi && - svn add hi && - svn commit -m "hihi" && - cd .. - svn mkdir -m "new glob at top level" "$svnrepo"/glob && - svn mv -m "move blob down a level" "$svnrepo"/blob "$svnrepo"/glob/blob && - git svn init --minimize-url -i blob "$svnrepo"/glob/blob && + svn mkdir -m "follow higher-level parent" "$svnrepo"/blob && + svn co "$svnrepo"/blob blob && + ( + cd blob && + echo hi > hi && + svn add hi && + svn commit -m "hihi" + ) && + svn mkdir -m "new glob at top level" "$svnrepo"/glob && + svn mv -m "move blob down a level" "$svnrepo"/blob "$svnrepo"/glob/blob && + git svn init --minimize-url -i blob "$svnrepo"/glob/blob && git svn fetch -i blob ' @@ -117,18 +120,23 @@ test_expect_success 'follow-parent avoids deleting relevant info' ' import/trunk/subversion/bindings/swig/perl/t/larger-parent && echo "bad delete test 2" > \ import/trunk/subversion/bindings/swig/perl/another-larger && - cd import && - svn import -m "r9270 test" . "$svnrepo"/r9270 && - cd .. && + ( + cd import && + svn import -m "r9270 test" . "$svnrepo"/r9270 + ) && svn_cmd co "$svnrepo"/r9270/trunk/subversion/bindings/swig/perl r9270 && - cd r9270 && - svn mkdir native && - svn mv t native/t && - for i in a b c; do svn mv $i.pm native/$i.pm; done && - echo z >> native/t/c.t && - poke native/t/c.t && - svn commit -m "reorg test" && - cd .. && + ( + cd r9270 && + svn mkdir native && + svn mv t native/t && + for i in a b c + do + svn mv $i.pm native/$i.pm + done && + echo z >>native/t/c.t && + poke native/t/c.t && + svn commit -m "reorg test" + ) && git svn init --minimize-url -i r9270-t \ "$svnrepo"/r9270/trunk/subversion/bindings/swig/perl/native/t && git svn fetch -i r9270-t && |