(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'git svn log tests'>)} spids: [13] ) ] spids: [13] ) (C {(.)} {(./lib-git-svn.sh)}) (C {(test_expect_success)} {(SQ <'setup repository and import'>)} { (SQ <'\n'> <'\tmkdir import &&\n'> <'\t(\n'> <'\t\tcd import &&\n'> <'\t\tfor i in trunk branches/a branches/b tags/0.1 tags/0.2 tags/0.3\n'> <'\t\tdo\n'> <'\t\t\tmkdir -p $i &&\n'> <'\t\t\techo hello >>$i/README ||\n'> <'\t\t\texit 1\n'> <'\t\tdone &&\n'> <'\t\tsvn_cmd import -m test . "$svnrepo"\n'> <'\t) &&\n'> <'\tgit svn init "$svnrepo" -T trunk -b branches -t tags &&\n'> <'\tgit svn fetch &&\n'> <'\tgit reset --hard origin/trunk &&\n'> <'\techo bye >> README &&\n'> <'\tgit commit -a -m bye &&\n'> <'\tgit svn dcommit &&\n'> <'\tgit reset --hard origin/a &&\n'> <'\techo why >> FEEDME &&\n'> <'\tgit update-index --add FEEDME &&\n'> <'\tgit commit -m feedme &&\n'> <'\tgit svn dcommit &&\n'> <'\tgit reset --hard origin/trunk &&\n'> <'\techo aye >> README &&\n'> <'\tgit commit -a -m aye &&\n'> <'\tgit svn dcommit &&\n'> <'\tgit reset --hard origin/b &&\n'> <'\techo spy >> README &&\n'> <'\tgit commit -a -m spy &&\n'> <'\techo try >> README &&\n'> <'\tgit commit -a -m try &&\n'> <'\tgit svn dcommit\n'> <'\t'> ) } ) (C {(test_expect_success)} {(SQ <'run log'>)} { (DQ ('\n') ('\tgit reset --hard origin/a &&\n') ('\tgit svn log -r2 origin/trunk | grep ^r2 &&\n') ('\tgit svn log -r4 origin/trunk | grep ^r4 &&\n') ('\tgit svn log -r3 | grep ^r3\n') ('\t') ) } ) (C {(test_expect_success)} {(SQ <'run log against a from trunk'>)} { (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') ('\tgit svn log -r3 origin/a | grep ^r3\n') ('\t') ) } ) (SimpleCommand words: [{(printf)} {(SQ <'r1 \\nr2 \\nr4 \\n'>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expected-range-r1-r2-r4)} spids:[103])] ) (C {(test_expect_success)} {(SQ <'test ascending revision range'>)} { (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') ( "\tgit svn log -r 1:4 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r1-r2-r4 -\n" ) ('\t') ) } ) (C {(test_expect_success)} {(SQ <'test ascending revision range with --show-commit'>)} { (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') ( "\tgit svn log --show-commit -r 1:4 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r1-r2-r4 -\n" ) ('\t') ) } ) (C {(test_expect_success)} {(SQ <'test ascending revision range with --show-commit (sha1)'>)} { (DQ ('\n') ('\tgit svn find-rev r1 >expected-range-r1-r2-r4-sha1 &&\n') ('\tgit svn find-rev r2 >>expected-range-r1-r2-r4-sha1 &&\n') ('\tgit svn find-rev r4 >>expected-range-r1-r2-r4-sha1 &&\n') ('\tgit reset --hard origin/trunk &&\n') ("\tgit svn log --show-commit -r 1:4 | grep '^r[0-9]' | cut -d'|' -f2 >out &&\n") ('\tgit rev-parse ') (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('(cat out) >actual &&\n') ('\ttest_cmp expected-range-r1-r2-r4-sha1 actual\n') ('\t') ) } ) (SimpleCommand words: [{(printf)} {(SQ <'r4 \\nr2 \\nr1 \\n'>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expected-range-r4-r2-r1)} spids:[163])] ) (C {(test_expect_success)} {(SQ <'test descending revision range'>)} { (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') ( "\tgit svn log -r 4:1 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r4-r2-r1 -\n" ) ('\t') ) } ) (SimpleCommand words: [{(printf)} {(SQ <'r1 \\nr2 \\n'>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expected-range-r1-r2)} spids:[188])] ) (C {(test_expect_success)} {(SQ <'test ascending revision range with unreachable revision'>)} { (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') ( "\tgit svn log -r 1:3 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r1-r2 -\n" ) ('\t') ) } ) (SimpleCommand words: [{(printf)} {(SQ <'r2 \\nr1 \\n'>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expected-range-r2-r1)} spids:[213])] ) (C {(test_expect_success)} {(SQ <'test descending revision range with unreachable revision'>)} { (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') ( "\tgit svn log -r 3:1 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r2-r1 -\n" ) ('\t') ) } ) (SimpleCommand words: [{(printf)} {(SQ <'r2 \\n'>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expected-range-r2)} spids:[238])] ) (C {(test_expect_success)} {(SQ <'test ascending revision range with unreachable upper boundary revision and 1 commit'>)} { (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') ( "\tgit svn log -r 2:3 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r2 -\n" ) ('\t') ) } ) (C {(test_expect_success)} {(SQ <'test descending revision range with unreachable upper boundary revision and 1 commit'>)} { (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') ( "\tgit svn log -r 3:2 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r2 -\n" ) ('\t') ) } ) (SimpleCommand words: [{(printf)} {(SQ <'r4 \\n'>)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expected-range-r4)} spids:[277])] ) (C {(test_expect_success)} {(SQ <'test ascending revision range with unreachable lower boundary revision and 1 commit'>)} { (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') ( "\tgit svn log -r 3:4 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r4 -\n" ) ('\t') ) } ) (C {(test_expect_success)} {(SQ <'test descending revision range with unreachable lower boundary revision and 1 commit'>)} { (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') ( "\tgit svn log -r 4:3 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r4 -\n" ) ('\t') ) } ) (SimpleCommand words: [ {(printf)} {(--)} {(SQ <'------------------------------------------------------------------------\\n'>)} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expected-separator)} spids:[318])] ) (C {(test_expect_success)} {(SQ <'test ascending revision range with unreachable boundary revisions and no commits'>)} { (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') ('\tgit svn log -r 5:6 | test_cmp expected-separator -\n') ('\t') ) } ) (C {(test_expect_success)} {(SQ <'test descending revision range with unreachable boundary revisions and no commits'>)} { (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') ('\tgit svn log -r 6:5 | test_cmp expected-separator -\n') ('\t') ) } ) (C {(test_expect_success)} {(SQ <'test ascending revision range with unreachable boundary revisions and 1 commit'>)} { (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') ( "\tgit svn log -r 3:5 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r4 -\n" ) ('\t') ) } ) (C {(test_expect_success)} {(SQ <'test descending revision range with unreachable boundary revisions and 1 commit'>)} { (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') ( "\tgit svn log -r 5:3 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r4 -\n" ) ('\t') ) } ) (C {(test_done)}) ] )