(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"git svn commit-diff">)} spids: [9] ) ] spids: [9] ) (C {(.)} {(./lib-git-svn.sh)}) (C {(test_expect_success)} {(SQ <"initialize repo">)} { (SQ <"\n"> <"\tmkdir import &&\n"> <"\t(\n"> <"\t\tcd import &&\n"> <"\t\techo hello >readme &&\n"> <"\t\tsvn_cmd import -m \"initial\" . \"$svnrepo\"\n"> <"\t) &&\n"> <"\techo hello > readme &&\n"> <"\tgit update-index --add readme &&\n"> <"\tgit commit -a -m \"initial\" &&\n"> <"\techo world >> readme &&\n"> <"\tgit commit -a -m \"another\"\n"> <"\t"> ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:head) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(git)} {(rev-parse)} {(--verify)} {(HEAD) (Lit_Other "^") (0)})] ) left_token: <Left_CommandSub "$("> spids: [43 53] ) } spids: [42] ) ] spids: [42] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:prev) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(git)} {(rev-parse)} {(--verify)} {(HEAD) (Lit_Other "^") (1)})] ) left_token: <Left_CommandSub "$("> spids: [56 66] ) } spids: [55] ) ] spids: [55] ) (C {(test_expect_success)} {(SQ <"test the commit-diff command">)} { (SQ <"\n"> <"\ttest -n \"$prev\" && test -n \"$head\" &&\n"> <"\tgit svn commit-diff -r1 \"$prev\" \"$head\" \"$svnrepo\" &&\n"> <"\tsvn_cmd co \"$svnrepo\" wc &&\n"> <"\tcmp readme wc/readme\n"> <"\t"> ) } ) (C {(test_expect_success)} {(SQ <"commit-diff to a sub-directory (with git svn config)">)} { (SQ <"\n"> <"\tsvn_cmd import -m \"sub-directory\" import \"$svnrepo\"/subdir &&\n"> <"\tgit svn init --minimize-url \"$svnrepo\"/subdir &&\n"> <"\tgit svn fetch &&\n"> <"\tgit svn commit-diff -r3 \"$prev\" \"$head\" &&\n"> <"\tsvn_cmd cat \"$svnrepo\"/subdir/readme > readme.2 &&\n"> <"\tcmp readme readme.2\n"> <"\t"> ) } ) (C {(test_done)}) ] )