(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'git svn authorship'>)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./lib-git-svn.sh)}) (C {(test_expect_success)} {(SQ <'setup svn repository'>)} { (SQ <'\n'> <'\tsvn_cmd checkout "$svnrepo" work.svn &&\n'> <'\t(\n'> <'\t\tcd work.svn &&\n'> <'\t\techo >file\n'> <'\t\tsvn_cmd add file\n'> <'\t\tsvn_cmd commit -m "first commit" file\n'> <'\t)\n'> ) } ) (C {(test_expect_success)} {(SQ <'interact with it via git svn'>)} { (SQ <'\n'> <'\tmkdir work.git &&\n'> <'\t(\n'> <'\t\tcd work.git &&\n'> <'\t\tgit svn init "$svnrepo"\n'> <'\t\tgit svn fetch &&\n'> <'\n'> <'\t\techo modification >file &&\n'> <'\t\ttest_tick &&\n'> <'\t\tgit commit -a -m second &&\n'> <'\n'> <'\t\ttest_tick &&\n'> <'\t\tgit svn dcommit &&\n'> <'\n'> <'\t\techo "further modification" >file &&\n'> <'\t\ttest_tick &&\n'> <'\t\tgit commit -a -m third &&\n'> <'\n'> <'\t\ttest_tick &&\n'> <'\t\tgit svn --add-author-from dcommit &&\n'> <'\n'> <'\t\techo "yet further modification" >file &&\n'> <'\t\ttest_tick &&\n'> <'\t\tgit commit -a -m fourth &&\n'> <'\n'> <'\t\ttest_tick &&\n'> <'\t\tgit svn --add-author-from --use-log-author dcommit &&\n'> <'\n'> <'\t\tgit log &&\n'> <'\n'> <'\t\tgit show -s HEAD^^ >../actual.2 &&\n'> <'\t\tgit show -s HEAD^ >../actual.3 &&\n'> <'\t\tgit show -s HEAD >../actual.4\n'> <'\n'> <'\t) &&\n'> <'\n'> <'\t# Make sure that --add-author-from without --use-log-author\n'> <'\t# did not affect the authorship information\n'> <'\tmyself=$(grep "^Author: " actual.2) &&\n'> <'\tunaffected=$(grep "^Author: " actual.3) &&\n'> <'\ttest "z$myself" = "z$unaffected" &&\n'> <'\n'> <'\t# Make sure lack of --add-author-from did not add cruft\n'> <'\t! grep "^ From: A U Thor " actual.2 &&\n'> <'\n'> <'\t# Make sure --add-author-from added cruft\n'> <'\tgrep "^ From: A U Thor " actual.3 &&\n'> <'\tgrep "^ From: A U Thor " actual.4 &&\n'> <'\n'> <'\t# Make sure --add-author-from with --use-log-author affected\n'> <'\t# the authorship information\n'> <'\tgrep "^Author: A U Thor " actual.4 &&\n'> <'\n'> <'\t# Make sure there are no commit messages with excess blank lines\n'> <'\ttest $(grep "^ " actual.2 | wc -l) = 3 &&\n'> <'\ttest $(grep "^ " actual.3 | wc -l) = 5 &&\n'> <'\ttest $(grep "^ " actual.4 | wc -l) = 5 &&\n'> <'\n'> <'\t# Make sure there are no svn commit messages with excess blank lines\n'> <'\t(\n'> <'\t\tcd work.svn &&\n'> <'\t\tsvn_cmd up &&\n'> <'\t\t\n'> <'\t\ttest $(svn_cmd log -r2:2 | wc -l) = 5 &&\n'> <'\t\ttest $(svn_cmd log -r4:4 | wc -l) = 7\n'> <'\t)\n'> ) } ) (C {(test_done)}) ] )