(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 dcommit clobber series'>)} spids: [9] ) ] redirects: [] ) (C {<.>} {<'./lib-git-svn.sh'>}) (C {<test_expect_success>} {(SQ <'initialize repo'>)} { (SQ <'\n'> <'\tmkdir import &&\n'> <'\t(cd import &&\n'> <'\tawk "BEGIN { for (i = 1; i < 64; i++) { print i } }" > file\n'> <'\tsvn_cmd import -m "initial" . "$svnrepo"\n'> <'\t) &&\n'> <'\tgit svn init "$svnrepo" &&\n'> <'\tgit svn fetch &&\n'> <'\ttest -e file\n'> <'\t'> ) } ) (C {<test_expect_success>} {(SQ <'(supposedly) non-conflicting change from SVN'>)} { (SQ <'\n'> <'\ttest x"$(sed -n -e 58p < file)" = x58 &&\n'> <'\ttest x"$(sed -n -e 61p < file)" = x61 &&\n'> <'\tsvn_cmd co "$svnrepo" tmp &&\n'> <'\t(cd tmp &&\n'> <'\t\tperl -i.bak -p -e "s/^58$/5588/" file &&\n'> <'\t\tperl -i.bak -p -e "s/^61$/6611/" file &&\n'> <'\t\tpoke file &&\n'> <'\t\ttest x"$(sed -n -e 58p < file)" = x5588 &&\n'> <'\t\ttest x"$(sed -n -e 61p < file)" = x6611 &&\n'> <'\t\tsvn_cmd commit -m "58 => 5588, 61 => 6611"\n'> <'\t)\n'> <'\t'> ) } ) (C {<test_expect_success>} {(SQ <'some unrelated changes to git'>)} { (DQ <'\n'> <'\techo hi > life &&\n'> <'\tgit update-index --add life &&\n'> <'\tgit commit -m hi-life &&\n'> <'\techo bye >> life &&\n'> <'\tgit commit -m bye-life life\n'> <'\t'> ) } ) (C {<test_expect_success>} {(SQ <'change file but in unrelated area'>)} { (DQ <'\n'> <'\ttest x'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') <'(sed -n -e 4p < file)'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <' = x4 &&\n'> <'\ttest x'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') <'(sed -n -e 7p < file)'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <' = x7 &&\n'> <'\tperl -i.bak -p -e \'s/^4'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') <'/4444/\' file &&\n'> <'\tperl -i.bak -p -e \'s/^7'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') <'/7777/\' file &&\n'> <'\ttest x'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') <'(sed -n -e 4p < file)'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <' = x4444 &&\n'> <'\ttest x'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') <'(sed -n -e 7p < file)'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <' = x7777 &&\n'> <'\tgit commit -m \'4 => 4444, 7 => 7777\' file &&\n'> <'\tgit svn dcommit &&\n'> <'\tsvn_cmd up tmp &&\n'> <'\tcd tmp &&\n'> <'\t\ttest x'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') <'(sed -n -e 4p < file)'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <' = x4444 &&\n'> <'\t\ttest x'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') <'(sed -n -e 7p < file)'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <' = x7777 &&\n'> <'\t\ttest x'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') <'(sed -n -e 58p < file)'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <' = x5588 &&\n'> <'\t\ttest x'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') <'(sed -n -e 61p < file)'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <' = x6611\n'> <'\t'> ) } ) (C {<test_expect_success>} {(SQ <'attempt to dcommit with a dirty index'>)} { (SQ <'\n'> <'\techo foo >>file &&\n'> <'\tgit add file &&\n'> <'\ttest_must_fail git svn dcommit\n'> ) } ) (C {<test_done>}) ] )