(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description) op: assign_op.Equal rhs: {(SQ <'git svn merge detection'>)} spids: [13] ) ] redirects: [] ) (C {<.>} {<'./lib-git-svn.sh'>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'svn_ver='> name:svn_ver) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<svn>} {<--version>} {<--quiet>}) right: <Id.Eof_RParen _> ) ) } spids: [23] ) ] redirects: [] ) (command.Case to_match: {($ Id.VSub_DollarName svn_ver)} arms: [ (case_arm pat_list: [ {<0.> <Id.Lit_Star '*'>} {<1.> <Id.Lit_LBracket '['> <0-4> <Id.Lit_RBracket ']'> <.> <Id.Lit_Star '*'>} ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'skip_all='> name:skip_all) op: assign_op.Equal rhs: { (DQ <'skipping git-svn test - SVN too old ('> ($ Id.VSub_DollarName svn_ver) <')'> ) } spids: [54] ) ] redirects: [] ) (C {<test_done>}) ] spids: [40 51 65 -1] ) ] redirects: [] ) (C {<test_expect_success>} {(SQ <'initialize source svn repo'>)} { (SQ <'\n'> <'\tsvn_cmd mkdir -m x "$svnrepo"/trunk &&\n'> <'\tsvn_cmd mkdir -m x "$svnrepo"/branches &&\n'> <'\tsvn_cmd co "$svnrepo"/trunk "$SVN_TREE" &&\n'> <'\t(\n'> <'\t\tcd "$SVN_TREE" &&\n'> <'\t\ttouch foo &&\n'> <'\t\tsvn_cmd add foo &&\n'> <'\t\tsvn_cmd commit -m "initial commit" &&\n'> <'\t\tsvn_cmd cp -m branch "$svnrepo"/trunk "$svnrepo"/branches/branch1 &&\n'> <'\t\tsvn_cmd switch "$svnrepo"/branches/branch1 &&\n'> <'\t\ttouch bar &&\n'> <'\t\tsvn_cmd add bar &&\n'> <'\t\tsvn_cmd commit -m branch1 &&\n'> <'\t\tsvn_cmd cp -m branch "$svnrepo"/branches/branch1 "$svnrepo"/branches/branch2 &&\n'> <'\t\tsvn_cmd switch "$svnrepo"/branches/branch2 &&\n'> <'\t\ttouch baz &&\n'> <'\t\tsvn_cmd add baz &&\n'> <'\t\tsvn_cmd commit -m branch2 &&\n'> <'\t\tsvn_cmd switch "$svnrepo"/trunk &&\n'> <'\t\ttouch bar2 &&\n'> <'\t\tsvn_cmd add bar2 &&\n'> <'\t\tsvn_cmd commit -m trunk &&\n'> <'\t\tsvn_cmd switch "$svnrepo"/branches/branch2 &&\n'> <'\t\tsvn_cmd merge "$svnrepo"/trunk &&\n'> <'\t\tsvn_cmd commit -m "merge trunk"\n'> <'\t\tsvn_cmd switch "$svnrepo"/trunk &&\n'> <'\t\tsvn_cmd merge --reintegrate "$svnrepo"/branches/branch2 &&\n'> <'\t\tsvn_cmd commit -m "merge branch2"\n'> <'\t) &&\n'> <'\trm -rf "$SVN_TREE"\n'> ) } ) (C {<test_expect_success>} {(SQ <'clone svn repo'>)} {(SQ <'\n'> <'\tgit svn init -s "$svnrepo" &&\n'> <'\tgit svn fetch\n'>)} ) (C {<test_expect_success>} {(SQ <'verify merge commit'>)} { (SQ <'x=$(git rev-parse HEAD^2) &&\n'> <'\ty=$(git rev-parse origin/branch2) &&\n'> <'\ttest "x$x" = "x$y"\n'> ) } ) (C {<test_done>}) ] )