(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <"git svn basic tests">)}
          spids: [13]
        )
      ]
      spids: [13]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:GIT_SVN_LC_ALL)
          op: Equal
          rhs: 
            {
              (BracedVarSub
                token: <VSub_Name LC_ALL>
                suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{($ VSub_Name "$LANG")})
                spids: [19 23]
              )
            }
          spids: [18]
        )
      ]
      spids: [18]
    )
    (C {(.)} {(./lib-git-svn.sh)})
    (Case
      to_match: {(DQ ($ VSub_Name "$GIT_SVN_LC_ALL"))}
      arms: [
        (case_arm
          pat_list: [{(Lit_Other "*") (.UTF-8)}]
          action: [(C {(test_set_prereq)} {(UTF8)})]
          spids: [39 41 49 -1]
        )
        (case_arm
          pat_list: [{(Lit_Other "*")}]
          action: [
            (C {(say)} 
              {
                (DQ ("# UTF-8 locale not set, some tests skipped (") ($ VSub_Name "$GIT_SVN_LC_ALL") 
                  (")")
                )
              }
            )
          ]
          spids: [51 52 64 -1]
        )
      ]
      spids: [31 37 66]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:deepdir) op:Equal rhs:{(nothing-above)} spids:[69])]
      spids: [69]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:ceiling) op:Equal rhs:{($ VSub_Name "$PWD")} spids:[72])]
      spids: [72]
    )
    (C {(test_expect_success)} {(SQ <"git svn --version works anywhere">)} 
      {
        (SQ <"\n"> <"\tmkdir -p \"$deepdir\" && (\n"> <"\t\tGIT_CEILING_DIRECTORIES=\"$ceiling\" &&\n"> 
          <"\t\texport GIT_CEILING_DIRECTORIES &&\n"> <"\t\tcd \"$deepdir\" &&\n"> <"\t\tgit svn --version\n"> <"\t)\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"git svn help works anywhere">)} 
      {
        (SQ <"\n"> <"\tmkdir -p \"$deepdir\" && (\n"> <"\t\tGIT_CEILING_DIRECTORIES=\"$ceiling\" &&\n"> 
          <"\t\texport GIT_CEILING_DIRECTORIES &&\n"> <"\t\tcd \"$deepdir\" &&\n"> <"\t\tgit svn help\n"> <"\t)\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"initialize git svn">)} 
      {
        (SQ <"\n"> <"\tmkdir import &&\n"> <"\t(\n"> <"\t\tcd import &&\n"> <"\t\techo foo >foo &&\n"> 
          <"\t\tln -s foo foo.link\n"> <"\t\tmkdir -p dir/a/b/c/d/e &&\n"> <"\t\techo \"deep dir\" >dir/a/b/c/d/e/file &&\n"> 
          <"\t\tmkdir bar &&\n"> <"\t\techo \"zzz\" >bar/zzz &&\n"> <"\t\techo \"#!/bin/sh\" >exec.sh &&\n"> 
          <"\t\tchmod +x exec.sh &&\n"> <"\t\tsvn_cmd import -m \"import for git svn\" . \"$svnrepo\" >/dev/null\n"> <"\t) &&\n"> 
          <"\trm -rf import &&\n"> <"\tgit svn init \"$svnrepo\"">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"import an SVN revision into git">)} {(SQ <"git svn fetch">)})
    (C {(test_expect_success)} {(DQ ("checkout from svn"))} {(SQ <"svn co \"$svnrepo\" \"$SVN_TREE\"">)})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:name)
          op: Equal
          rhs: {(SQ <"try a deep --rmdir with a commit">)}
          spids: [164]
        )
      ]
      spids: [164]
    )
    (C {(test_expect_success)} {(DQ ($ VSub_Name "$name"))} 
      {
        (SQ <"\n"> <"\tgit checkout -f -b mybranch remotes/git-svn &&\n"> 
          <"\tmv dir/a/b/c/d/e/file dir/file &&\n"> <"\tcp dir/file file &&\n"> 
          <"\tgit update-index --add --remove dir/a/b/c/d/e/file dir/file file &&\n"> <"\tgit commit -m \"$name\" &&\n"> <"\tgit svn set-tree --find-copies-harder --rmdir \\\n"> 
          <"\t\tremotes/git-svn..mybranch &&\n"> <"\tsvn_cmd up \"$SVN_TREE\" &&\n"> <"\ttest -d \"$SVN_TREE\"/dir && test ! -d \"$SVN_TREE\"/dir/a">
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:name)
          op: Equal
          rhs: {(SQ <"detect node change from file to directory #1">)}
          spids: [190]
        )
      ]
      spids: [190]
    )
    (C {(test_expect_success)} {(DQ ($ VSub_Name "$name"))} 
      {
        (DQ ("\n") ("\tmkdir dir/new_file &&\n") ("\tmv dir/file dir/new_file/file &&\n") 
          ("\tmv dir/new_file dir/file &&\n") ("\tgit update-index --remove dir/file &&\n") ("\tgit update-index --add dir/file/file &&\n") 
          ("\tgit commit -m '") ($ VSub_Name "$name") ("' &&\n") ("\ttest_must_fail git svn set-tree --find-copies-harder --rmdir ") 
          ("\t\tremotes/git-svn..mybranch\n")
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:name)
          op: Equal
          rhs: {(SQ <"detect node change from directory to file #1">)}
          spids: [218]
        )
      ]
      spids: [218]
    )
    (C {(test_expect_success)} {(DQ ($ VSub_Name "$name"))} 
      {
        (SQ <"\n"> <"\trm -rf dir \"$GIT_DIR\"/index &&\n"> 
          <"\tgit checkout -f -b mybranch2 remotes/git-svn &&\n"> <"\tmv bar/zzz zzz &&\n"> <"\trm -rf bar &&\n"> <"\tmv zzz bar &&\n"> 
          <"\tgit update-index --remove -- bar/zzz &&\n"> <"\tgit update-index --add -- bar &&\n"> <"\tgit commit -m \"$name\" &&\n"> 
          <"\ttest_must_fail git svn set-tree --find-copies-harder --rmdir \\\n"> <"\t\tremotes/git-svn..mybranch2\n">
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:name)
          op: Equal
          rhs: {(SQ <"detect node change from file to directory #2">)}
          spids: [245]
        )
      ]
      spids: [245]
    )
    (C {(test_expect_success)} {(DQ ($ VSub_Name "$name"))} 
      {
        (SQ <"\n"> <"\trm -f \"$GIT_DIR\"/index &&\n"> 
          <"\tgit checkout -f -b mybranch3 remotes/git-svn &&\n"> <"\trm bar/zzz &&\n"> <"\tgit update-index --remove bar/zzz &&\n"> <"\tmkdir bar/zzz &&\n"> 
          <"\techo yyy > bar/zzz/yyy &&\n"> <"\tgit update-index --add bar/zzz/yyy &&\n"> <"\tgit commit -m \"$name\" &&\n"> 
          <"\tgit svn set-tree --find-copies-harder --rmdir \\\n"> <"\t\tremotes/git-svn..mybranch3 &&\n"> <"\tsvn_cmd up \"$SVN_TREE\" &&\n"> 
          <"\ttest -d \"$SVN_TREE\"/bar/zzz &&\n"> <"\ttest -e \"$SVN_TREE\"/bar/zzz/yyy\n">
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:name)
          op: Equal
          rhs: {(SQ <"detect node change from directory to file #2">)}
          spids: [274]
        )
      ]
      spids: [274]
    )
    (C {(test_expect_success)} {(DQ ($ VSub_Name "$name"))} 
      {
        (SQ <"\n"> <"\trm -f \"$GIT_DIR\"/index &&\n"> 
          <"\tgit checkout -f -b mybranch4 remotes/git-svn &&\n"> <"\trm -rf dir &&\n"> <"\tgit update-index --remove -- dir/file &&\n"> <"\ttouch dir &&\n"> 
          <"\techo asdf > dir &&\n"> <"\tgit update-index --add -- dir &&\n"> <"\tgit commit -m \"$name\" &&\n"> 
          <"\ttest_must_fail git svn set-tree --find-copies-harder --rmdir \\\n"> <"\t\tremotes/git-svn..mybranch4\n">
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:name)
          op: Equal
          rhs: {(SQ <"remove executable bit from a file">)}
          spids: [301]
        )
      ]
      spids: [301]
    )
    (C {(test_expect_success)} {(POSIXPERM)} {(DQ ($ VSub_Name "$name"))} 
      {
        (SQ <"\n"> <"\trm -f \"$GIT_DIR\"/index &&\n"> 
          <"\tgit checkout -f -b mybranch5 remotes/git-svn &&\n"> <"\tchmod -x exec.sh &&\n"> <"\tgit update-index exec.sh &&\n"> <"\tgit commit -m \"$name\" &&\n"> 
          <"\tgit svn set-tree --find-copies-harder --rmdir \\\n"> <"\t\tremotes/git-svn..mybranch5 &&\n"> <"\tsvn_cmd up \"$SVN_TREE\" &&\n"> 
          <"\ttest ! -x \"$SVN_TREE\"/exec.sh">
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:name)
          op: Equal
          rhs: {(SQ <"add executable bit back file">)}
          spids: [329]
        )
      ]
      spids: [329]
    )
    (C {(test_expect_success)} {(POSIXPERM)} {(DQ ($ VSub_Name "$name"))} 
      {
        (SQ <"\n"> <"\tchmod +x exec.sh &&\n"> <"\tgit update-index exec.sh &&\n"> 
          <"\tgit commit -m \"$name\" &&\n"> <"\tgit svn set-tree --find-copies-harder --rmdir \\\n"> <"\t\tremotes/git-svn..mybranch5 &&\n"> 
          <"\tsvn_cmd up \"$SVN_TREE\" &&\n"> <"\ttest -x \"$SVN_TREE\"/exec.sh">
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:name)
          op: Equal
          rhs: {(SQ <"executable file becomes a symlink to file">)}
          spids: [355]
        )
      ]
      spids: [355]
    )
    (C {(test_expect_success)} {(SYMLINKS)} {(DQ ($ VSub_Name "$name"))} 
      {
        (SQ <"\n"> <"\trm exec.sh &&\n"> <"\tln -s file exec.sh &&\n"> 
          <"\tgit update-index exec.sh &&\n"> <"\tgit commit -m \"$name\" &&\n"> <"\tgit svn set-tree --find-copies-harder --rmdir \\\n"> 
          <"\t\tremotes/git-svn..mybranch5 &&\n"> <"\tsvn_cmd up \"$SVN_TREE\" &&\n"> <"\ttest -h \"$SVN_TREE\"/exec.sh">
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:name)
          op: Equal
          rhs: {(SQ <"new symlink is added to a file that was also just made executable">)}
          spids: [381]
        )
      ]
      spids: [381]
    )
    (C {(test_expect_success)} {(POSIXPERM) (Lit_Comma ",") (SYMLINKS)} {(DQ ($ VSub_Name "$name"))} 
      {
        (SQ <"\n"> <"\tchmod +x file &&\n"> <"\tln -s file exec-2.sh &&\n"> 
          <"\tgit update-index --add file exec-2.sh &&\n"> <"\tgit commit -m \"$name\" &&\n"> <"\tgit svn set-tree --find-copies-harder --rmdir \\\n"> 
          <"\t\tremotes/git-svn..mybranch5 &&\n"> <"\tsvn_cmd up \"$SVN_TREE\" &&\n"> <"\ttest -x \"$SVN_TREE\"/file &&\n"> 
          <"\ttest -h \"$SVN_TREE\"/exec-2.sh">
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:name)
          op: Equal
          rhs: {(SQ <"modify a symlink to become a file">)}
          spids: [411]
        )
      ]
      spids: [411]
    )
    (C {(test_expect_success)} {(POSIXPERM) (Lit_Comma ",") (SYMLINKS)} {(DQ ($ VSub_Name "$name"))} 
      {
        (SQ <"\n"> <"\techo git help >help &&\n"> <"\trm exec-2.sh &&\n"> <"\tcp help exec-2.sh &&\n"> 
          <"\tgit update-index exec-2.sh &&\n"> <"\tgit commit -m \"$name\" &&\n"> <"\tgit svn set-tree --find-copies-harder --rmdir \\\n"> 
          <"\t\tremotes/git-svn..mybranch5 &&\n"> <"\tsvn_cmd up \"$SVN_TREE\" &&\n"> <"\ttest -f \"$SVN_TREE\"/exec-2.sh &&\n"> 
          <"\ttest ! -h \"$SVN_TREE\"/exec-2.sh &&\n"> <"\ttest_cmp help \"$SVN_TREE\"/exec-2.sh">
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:name)
          op: Equal
          rhs: {(DQ ("commit with UTF-8 message: locale: ") ($ VSub_Name "$GIT_SVN_LC_ALL"))}
          spids: [442]
        )
      ]
      spids: [442]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:LC_ALL)
          op: Equal
          rhs: {(DQ ($ VSub_Name "$GIT_SVN_LC_ALL"))}
          spids: [448]
        )
      ]
      spids: [448]
    )
    (C {(export)} {(LC_ALL)})
    (C {(test_expect_success)} {(UTF8) (Lit_Comma ",") (POSIXPERM) (Lit_Comma ",") (SYMLINKS)} 
      {(DQ ($ VSub_Name "$name"))} 
      {
        (DQ ("\n") ("\techo '# hello' >> exec-2.sh &&\n") ("\tgit update-index exec-2.sh &&\n") 
          ("\tgit commit -m '\u00e9\u00ef\u220f' &&\n") ("\tgit svn set-tree HEAD")
        )
      }
    )
    (C {(unset)} {(LC_ALL)})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:name)
          op: Equal
          rhs: {(SQ <"test fetch functionality (svn => git) with alternate GIT_SVN_ID">)}
          spids: [485]
        )
      ]
      spids: [485]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:GIT_SVN_ID) op:Equal rhs:{(alt)} spids:[490])]
      spids: [490]
    )
    (C {(export)} {(GIT_SVN_ID)})
    (C {(test_expect_success)} {(DQ ($ VSub_Name "$name"))} 
      {
        (SQ <"git svn init \"$svnrepo\" && git svn fetch &&\n"> 
          <"     git rev-list --pretty=raw remotes/git-svn | grep ^tree | uniq > a &&\n"> <"     git rev-list --pretty=raw remotes/alt | grep ^tree | uniq > b &&\n"> <"     test_cmp a b">
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:name)
          op: Equal
          rhs: {(SQ <"check imported tree checksums expected tree checksums">)}
          spids: [513]
        )
      ]
      spids: [513]
    )
    (C {(rm)} {(-f)} {(expected)})
    (If
      arms: [
        (if_arm
          cond: [(C {(test_have_prereq)} {(UTF8)})]
          action: [
            (SimpleCommand
              words: [{(echo)} {(tree)} {(dc68b14b733e4ec85b04ab6f712340edc5dc936e)}]
              redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(expected)} spids:[539])]
            )
          ]
          spids: [-1 530]
        )
      ]
      spids: [-1 543]
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_DGreat fd:-1 arg_word:{(expected)} spids:[547])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {("tree c3322890dcf74901f32d216f05c5044f670ce632\n") 
              ("tree d3ccd5035feafd17b030c5732e7808cc49122853\n") ("tree d03e1630363d4881e68929d532746b20b0986b83\n") 
              ("tree 149d63cd5878155c846e8c55d7d8487de283f89e\n") ("tree 312b76e4f64ce14893aeac8591eb3960b065e247\n") 
              ("tree 149d63cd5878155c846e8c55d7d8487de283f89e\n") ("tree d667270a1f7b109f5eb3aaea21ede14b56bfdd6e\n") 
              ("tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4\n")
            }
          do_expansion: False
          here_end: EOF
          was_filled: True
          spids: [551]
        )
      ]
    )
    (C {(test_expect_success)} {(POSIXPERM) (Lit_Comma ",") (SYMLINKS)} {(DQ ($ VSub_Name "$name"))} 
      {(DQ ("test_cmp a expected"))}
    )
    (C {(test_expect_success)} {(SQ <"exit if remote refs are ambigious">)} 
      {
        (SQ <"\n"> <"        git config --add svn-remote.svn.fetch \\\n"> 
          <"\t\tbar:refs/remotes/git-svn &&\n"> <"\ttest_must_fail git svn migrate\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"exit if init-ing a would clobber a URL">)} 
      {
        (SQ <"\n"> <"        svnadmin create \"${PWD}/svnrepo2\" &&\n"> 
          <"        svn mkdir -m \"mkdir bar\" \"${svnrepo}2/bar\" &&\n"> <"        git config --unset svn-remote.svn.fetch \\\n"> <"\t\t\"^bar:refs/remotes/git-svn$\" &&\n"> 
          <"\ttest_must_fail git svn init \"${svnrepo}2/bar\"\n"> <"        ">
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ <"init allows us to connect to another directory in the same repo">)} 
      {
        (SQ <"\n"> <"        git svn init --minimize-url -i bar \"$svnrepo/bar\" &&\n"> 
          <"        git config --get svn-remote.svn.fetch \\\n"> <"                              \"^bar:refs/remotes/bar$\" &&\n"> 
          <"        git config --get svn-remote.svn.fetch \\\n"> <"\t\t\t      \"^:refs/remotes/git-svn$\"\n"> <"        ">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"dcommit $rev does not clobber current branch">)} 
      {
        (SQ <"\n"> <"\tgit svn fetch -i bar &&\n"> <"\tgit checkout -b my-bar refs/remotes/bar &&\n"> 
          <"\techo 1 > foo &&\n"> <"\tgit add foo &&\n"> <"\tgit commit -m \"change 1\" &&\n"> <"\techo 2 > foo &&\n"> 
          <"\tgit add foo &&\n"> <"\tgit commit -m \"change 2\" &&\n"> <"\told_head=$(git rev-parse HEAD) &&\n"> 
          <"\tgit svn dcommit -i bar HEAD^ &&\n"> <"\ttest $old_head = $(git rev-parse HEAD) &&\n"> 
          <"\ttest refs/heads/my-bar = $(git symbolic-ref HEAD) &&\n"> <"\tgit log refs/remotes/bar | grep \"change 1\" &&\n"> 
          <"\t! git log refs/remotes/bar | grep \"change 2\" &&\n"> <"\tgit checkout master &&\n"> <"\tgit branch -D my-bar\n"> <"\t">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"able to dcommit to a subdirectory">)} 
      {
        (SQ <"\n"> <"\tgit svn fetch -i bar &&\n"> <"\tgit checkout -b my-bar refs/remotes/bar &&\n"> 
          <"\techo abc > d &&\n"> <"\tgit update-index --add d &&\n"> <"\tgit commit -m \"/bar/d should be in the log\" &&\n"> 
          <"\tgit svn dcommit -i bar &&\n"> <"\ttest -z \"$(git diff refs/heads/my-bar refs/remotes/bar)\" &&\n"> <"\tmkdir newdir &&\n"> 
          <"\techo new > newdir/dir &&\n"> <"\tgit update-index --add newdir/dir &&\n"> <"\tgit commit -m \"add a new directory\" &&\n"> 
          <"\tgit svn dcommit -i bar &&\n"> <"\ttest -z \"$(git diff refs/heads/my-bar refs/remotes/bar)\" &&\n"> 
          <"\techo foo >> newdir/dir &&\n"> <"\tgit update-index newdir/dir &&\n"> <"\tgit commit -m \"modify a file in new directory\" &&\n"> 
          <"\tgit svn dcommit -i bar &&\n"> <"\ttest -z \"$(git diff refs/heads/my-bar refs/remotes/bar)\"\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"dcommit should not fail with a touched file">)} 
      {
        (SQ <"\n"> <"\ttest_commit \"commit-new-file-foo2\" foo2 &&\n"> 
          <"\ttest-chmtime =-60 foo &&\n"> <"\tgit svn dcommit\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"rebase should not fail with a touched file">)} 
      {(SQ <"\n"> <"\ttest-chmtime =-60 foo &&\n"> <"\tgit svn rebase\n">)}
    )
    (C {(test_expect_success)} {(SQ <"able to set-tree to a subdirectory">)} 
      {
        (SQ <"\n"> <"\techo cba > d &&\n"> <"\tgit update-index d &&\n"> 
          <"\tgit commit -m \"update /bar/d\" &&\n"> <"\tgit svn set-tree -i bar HEAD &&\n"> 
          <"\ttest -z \"$(git diff refs/heads/my-bar refs/remotes/bar)\"\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"git-svn works in a bare repository">)} 
      {
        (SQ <"\n"> <"\tmkdir bare-repo &&\n"> <"\t( cd bare-repo &&\n"> <"\tgit init --bare &&\n"> 
          <"\tGIT_DIR=. git svn init \"$svnrepo\" &&\n"> <"\tgit svn fetch ) &&\n"> <"\trm -rf bare-repo\n"> <"\t">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"git-svn works in in a repository with a gitdir: link">)} 
      {
        (SQ <"\n"> <"\tmkdir worktree gitdir &&\n"> <"\t( cd worktree &&\n"> 
          <"\tgit svn init \"$svnrepo\" &&\n"> <"\tgit init --separate-git-dir ../gitdir &&\n"> <"\tgit svn fetch ) &&\n"> 
          <"\trm -rf worktree gitdir\n"> <"\t">
        )
      }
    )
    (C {(test_done)})
  ]
)