(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ (Token id:Id.Lit_Chars val:'git svn dcommit clobber series' span_id:11))} spids: [9] ) ] ) (C {(.)} {(./lib-git-svn.sh)}) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'initialize repo' span_id:22))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:26) (Token id:Id.Lit_Chars val:'\tmkdir import &&\n' span_id:27) (Token id:Id.Lit_Chars val:'\t(cd import &&\n' span_id:28) (Token id: Id.Lit_Chars val: '\tawk "BEGIN { for (i = 1; i < 64; i++) { print i } }" > file\n' span_id: 29 ) (Token id:Id.Lit_Chars val:'\tsvn_cmd import -m "initial" . "$svnrepo"\n' span_id:30) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:31) (Token id:Id.Lit_Chars val:'\tgit svn init "$svnrepo" &&\n' span_id:32) (Token id:Id.Lit_Chars val:'\tgit svn fetch &&\n' span_id:33) (Token id:Id.Lit_Chars val:'\ttest -e file\n' span_id:34) (Token id:Id.Lit_Chars val:'\t' span_id:35) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'(supposedly) non-conflicting change from SVN' span_id:42))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:46) (Token id: Id.Lit_Chars val: '\ttest x"$(sed -n -e 58p < file)" = x58 &&\n' span_id: 47 ) (Token id:Id.Lit_Chars val:'\ttest x"$(sed -n -e 61p < file)" = x61 &&\n' span_id:48) (Token id:Id.Lit_Chars val:'\tsvn_cmd co "$svnrepo" tmp &&\n' span_id:49) (Token id:Id.Lit_Chars val:'\t(cd tmp &&\n' span_id:50) (Token id: Id.Lit_Chars val: '\t\tperl -i.bak -p -e "s/^58$/5588/" file &&\n' span_id: 51 ) (Token id:Id.Lit_Chars val:'\t\tperl -i.bak -p -e "s/^61$/6611/" file &&\n' span_id:52) (Token id:Id.Lit_Chars val:'\t\tpoke file &&\n' span_id:53) (Token id:Id.Lit_Chars val:'\t\ttest x"$(sed -n -e 58p < file)" = x5588 &&\n' span_id:54) (Token id: Id.Lit_Chars val: '\t\ttest x"$(sed -n -e 61p < file)" = x6611 &&\n' span_id: 55 ) (Token id:Id.Lit_Chars val:'\t\tsvn_cmd commit -m "58 => 5588, 61 => 6611"\n' span_id:56) (Token id:Id.Lit_Chars val:'\t)\n' span_id:57) (Token id:Id.Lit_Chars val:'\t' span_id:58) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'some unrelated changes to git' span_id:65))} { (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 (Token id:Id.Lit_Chars val:'change file but in unrelated area' span_id:82))} { (DQ ('\n') ('\ttest x') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:88) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:89)) ('(sed -n -e 4p < file)') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:91)) (' = x4 &&\n') ('\ttest x') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:94)) (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:95) ) ('(sed -n -e 7p < file)') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:97) ) (' = x7 &&\n') ("\tperl -i.bak -p -e 's/^4") (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:100) ) ("/4444/' file &&\n") ("\tperl -i.bak -p -e 's/^7") (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:103) ) ("/7777/' file &&\n") ('\ttest x') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:106) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:107)) ('(sed -n -e 4p < file)') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:109)) (' = x4444 &&\n') ('\ttest x') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:112)) (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:113) ) ('(sed -n -e 7p < file)') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:115) ) (' = 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: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:122) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:123)) ('(sed -n -e 4p < file)') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:125)) (' = x4444 &&\n') ('\t\ttest x') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:128)) (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:129) ) ('(sed -n -e 7p < file)') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:131) ) (' = x7777 &&\n') ('\t\ttest x') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:134) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:135)) ('(sed -n -e 58p < file)') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:137)) (' = x5588 &&\n') ('\t\ttest x') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:140)) (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:141) ) ('(sed -n -e 61p < file)') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:143) ) (' = x6611\n') ('\t') ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'attempt to dcommit with a dirty index' span_id:152))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:156) (Token id:Id.Lit_Chars val:'\techo foo >>file &&\n' span_id:157) (Token id:Id.Lit_Chars val:'\tgit add file &&\n' span_id:158) (Token id:Id.Lit_Chars val:'\ttest_must_fail git svn dcommit\n' span_id:159) ) } ) (C {(test_done)}) ] )