(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description spids:[21]) op: Equal rhs: {(SQ <'git svn authors file tests'>)} spids: [21] ) ] spids: [21] ) (C {(.)} {(./lib-git-svn.sh)}) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(svn-authors)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 44 stdin_parts: [ ('aa = AAAAAAA AAAAAAA <aa@example.com>\n') ('bb = BBBBBBB BBBBBBB <bb@example.com>\n') ] ) ] ) (C {(test_expect_success)} {(SQ <'setup svnrepo'>)} { (SQ <'\n'> <'\tfor i in aa bb cc dd\n'> <'\tdo\n'> <'\t\tsvn_cmd mkdir -m $i --username $i "$svnrepo"/$i\n'> <'\tdone\n'> <'\t'> ) } ) (C {(test_expect_success)} {(SQ <'start import with incomplete authors file'>)} { (SQ <'\n'> <'\ttest_must_fail git svn clone --authors-file=svn-authors "$svnrepo" x\n'> <'\t'>) } ) (C {(test_expect_success)} {(SQ <'imported 2 revisions successfully'>)} { (SQ <'\n'> <'\t(\n'> <'\t\tcd x\n'> <'\t\ttest "$(git rev-list refs/remotes/git-svn | wc -l)" -eq 2 &&\n'> <'\t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn | \\\n'> <'\t\t grep "^author BBBBBBB BBBBBBB <bb@example\\.com> " &&\n'> <'\t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn~1 | \\\n'> <'\t\t grep "^author AAAAAAA AAAAAAA <aa@example\\.com> "\n'> <'\t)\n'> <'\t'> ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(svn-authors)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 107 stdin_parts: [ ('cc = CCCCCCC CCCCCCC <cc@example.com>\n') ('dd = DDDDDDD DDDDDDD <dd@example.com>\n') ] ) ] ) (C {(test_expect_success)} {(SQ <'continues to import once authors have been added'>)} { (SQ <'\n'> <'\t(\n'> <'\t\tcd x\n'> <'\t\tgit svn fetch --authors-file=../svn-authors &&\n'> <'\t\ttest "$(git rev-list refs/remotes/git-svn | wc -l)" -eq 4 &&\n'> <'\t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn | \\\n'> <'\t\t grep "^author DDDDDDD DDDDDDD <dd@example\\.com> " &&\n'> <'\t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn~1 | \\\n'> <'\t\t grep "^author CCCCCCC CCCCCCC <cc@example\\.com> "\n'> <'\t)\n'> <'\t'> ) } ) (C {(test_expect_success)} {(SQ <'authors-file against globs'>)} { (SQ <'\n'> <'\tsvn_cmd mkdir -m globs --username aa \\\n'> <'\t "$svnrepo"/aa/trunk "$svnrepo"/aa/branches "$svnrepo"/aa/tags &&\n'> <'\tgit svn clone --authors-file=svn-authors -s "$svnrepo"/aa aa-work &&\n'> <'\tfor i in bb ee cc\n'> <'\tdo\n'> <'\t\tbranch="aa/branches/$i"\n'> <'\t\tsvn_cmd mkdir -m "$branch" --username $i "$svnrepo/$branch"\n'> <'\tdone\n'> <'\t'> ) } ) (C {(test_expect_success)} {(SQ <'fetch fails on ee'>)} { (SQ <'\n'> <'\t( cd aa-work && test_must_fail git svn fetch --authors-file=../svn-authors )\n'> <'\t'> ) } ) (command.FuncDef name: tmp_config_get body: (command.BraceGroup children: [ (C {(git)} {(config)} {(--file) (Lit_Other '=') (.git/svn/.metadata)} {(--get)} {(DQ ($ VSub_Number '$1'))} ) ] spids: [168] ) spids: [163 167] ) (C {(test_expect_success)} {(SQ <'failure happened without negative side effects'>)} { (SQ <'\n'> <'\t(\n'> <'\t\tcd aa-work &&\n'> <'\t\ttest 6 -eq "$(tmp_config_get svn-remote.svn.branches-maxRev)" &&\n'> <'\t\ttest 6 -eq "$(tmp_config_get svn-remote.svn.tags-maxRev)"\n'> <'\t)\n'> <'\t'> ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(svn-authors)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 216 stdin_parts: [('ee = EEEEEEE EEEEEEE <ee@example.com>\n')] ) ] ) (C {(test_expect_success)} {(SQ <'fetch continues after authors-file is fixed'>)} { (SQ <'\n'> <'\t(\n'> <'\t\tcd aa-work &&\n'> <'\t\tgit svn fetch --authors-file=../svn-authors &&\n'> <'\t\ttest 8 -eq "$(tmp_config_get svn-remote.svn.branches-maxRev)" &&\n'> <'\t\ttest 8 -eq "$(tmp_config_get svn-remote.svn.tags-maxRev)"\n'> <'\t)\n'> <'\t'> ) } ) (C {(test_expect_success)} {(KW_Bang '!') (MINGW)} {(SQ <'fresh clone with svn.authors-file in config'>)} { (SQ <'\n'> <'\t(\n'> <'\t\trm -r "$GIT_DIR" &&\n'> <'\t\ttest x = x"$(git config svn.authorsfile)" &&\n'> <'\t\ttest_config="$HOME"/.gitconfig &&\n'> <'\t\tsane_unset GIT_DIR &&\n'> <'\t\tgit config --global \\\n'> <'\t\t svn.authorsfile "$HOME"/svn-authors &&\n'> <'\t\ttest x"$HOME"/svn-authors = x"$(git config svn.authorsfile)" &&\n'> <'\t\tgit svn clone "$svnrepo" gitconfig.clone &&\n'> <'\t\tcd gitconfig.clone &&\n'> <'\t\tnr_ex=$(git log | grep "^Author:.*example.com" | wc -l) &&\n'> <'\t\tnr_rev=$(git rev-list HEAD | wc -l) &&\n'> <'\t\ttest $nr_rev -eq $nr_ex\n'> <'\t)\n'> ) } ) (C {(test_debug)} {(SQ <'GIT_DIR=gitconfig.clone/.git git log'>)}) (C {(test_done)}) ] )