(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 handles merges' span_id:15))}
          spids: [13]
        )
      ]
    )
    (C {(.)} {(./lib-git-svn.sh)})
    (command.ShFunction
      name: big_text_block
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.HereDoc
                  op: (Token id:Id.Redir_DLess val:'<<' span_id:33)
                  fd: -1
                  here_begin: {(EOF)}
                  here_end_span_id: 60
                  stdin_parts: [
                    ('#\n')
                    ('# (C) Copyright 2000 - 2005\n')
                    ('# Wolfgang Denk, DENX Software Engineering, wd@denx.de.\n')
                    ('#\n')
                    ('# See file CREDITS for list of people who contributed to this\n')
                    ('# project.\n')
                    ('#\n')
                    ('# This program is free software; you can redistribute it and/or\n')
                    ('# modify it under the terms of the GNU General Public License as\n')
                    ('# published by the Free Software Foundation; either version 2 of\n')
                    ('# the License, or (at your option) any later version.\n')
                    ('#\n')
                    ('# This program is distributed in the hope that it will be useful,\n')
                    ('# but WITHOUT ANY WARRANTY; without even the implied warranty of\n')
                    ('# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\tSee the\n')
                    ('# GNU General Public License for more details.\n')
                    ('#\n')
                    ('# You should have received a copy of the GNU General Public License\n')
                    ('# along with this program; if not, write to the Free Software\n')
                    ('# Foundation, Inc., 59 Temple Place, Suite 330, Boston,\n')
                    ('# MA 02111-1307 USA\n')
                    ('#\n')
                  ]
                )
              ]
            )
          ]
        )
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setup svn repository' span_id:67))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:71) 
          (Token id:Id.Lit_Chars val:'\tsvn_cmd co "$svnrepo" mysvnwork &&\n' span_id:72) (Token id:Id.Lit_Chars val:'\tmkdir -p mysvnwork/trunk &&\n' span_id:73) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:74) (Token id:Id.Lit_Chars val:'\t\tcd mysvnwork &&\n' span_id:75) 
          (Token id:Id.Lit_Chars val:'\t\tbig_text_block >>trunk/README &&\n' span_id:76) (Token id:Id.Lit_Chars val:'\t\tsvn_cmd add trunk &&\n' span_id:77) 
          (Token id:Id.Lit_Chars val:'\t\tsvn_cmd ci -m "first commit" trunk\n' span_id:78) (Token id:Id.Lit_Chars val:'\t)\n' span_id:79) (Token id:Id.Lit_Chars val:'\t' span_id:80)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'setup git mirror and merge' span_id:87))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:91) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit svn init "$svnrepo" -t tags -T trunk -b branches &&\n'
            span_id: 92
          ) (Token id:Id.Lit_Chars val:'\tgit svn fetch &&\n' span_id:93) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit checkout -b svn remotes/origin/trunk &&\n'
            span_id: 94
          ) (Token id:Id.Lit_Chars val:'\tgit checkout -b merge &&\n' span_id:95) 
          (Token id:Id.Lit_Chars val:'\techo new file > new_file &&\n' span_id:96) (Token id:Id.Lit_Chars val:'\tgit add new_file &&\n' span_id:97) 
          (Token id:Id.Lit_Chars val:'\tgit commit -a -m "New file" &&\n' span_id:98) (Token id:Id.Lit_Chars val:'\techo hello >> README &&\n' span_id:99) 
          (Token id:Id.Lit_Chars val:'\tgit commit -a -m "hello" &&\n' span_id:100) (Token id:Id.Lit_Chars val:'\techo add some stuff >> new_file &&\n' span_id:101) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit commit -a -m "add some stuff" &&\n'
            span_id: 102
          ) (Token id:Id.Lit_Chars val:'\tgit checkout svn &&\n' span_id:103) 
          (Token id:Id.Lit_Chars val:'\tmv -f README tmp &&\n' span_id:104) (Token id:Id.Lit_Chars val:'\techo friend > README &&\n' span_id:105) 
          (Token id:Id.Lit_Chars val:'\tcat tmp >> README &&\n' span_id:106) (Token id:Id.Lit_Chars val:'\tgit commit -a -m "friend" &&\n' span_id:107) 
          (Token id:Id.Lit_Chars val:'\tgit merge merge\n' span_id:108) (Token id:Id.Lit_Chars val:'\t' span_id:109)
        )
      }
    )
    (C {(test_debug)} {(SQ (Token id:Id.Lit_Chars val:'gitk --all & sleep 1' span_id:116))})
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'verify pre-merge ancestry' span_id:123))} 
      {
        (DQ ('\n') ('\ttest x') 
          (word_part.EscapedLiteral
            token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:129)
          ) ('(git rev-parse --verify refs/heads/svn^2) = ') ('\t     x') 
          (word_part.EscapedLiteral
            token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:133)
          ) ('(git rev-parse --verify refs/heads/merge) &&\n') 
          ("\tgit cat-file commit refs/heads/svn^ | grep '^friend") (Id.Lit_Other '$') ("'\n") ('\t')
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git svn dcommit merges' span_id:145))} 
      {(DQ ('\n') ('\tgit svn dcommit\n') ('\t'))}
    )
    (C {(test_debug)} {(SQ (Token id:Id.Lit_Chars val:'gitk --all & sleep 1' span_id:158))})
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'verify post-merge ancestry' span_id:165))} 
      {
        (DQ ('\n') ('\ttest x') 
          (word_part.EscapedLiteral
            token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:171)
          ) ('(git rev-parse --verify refs/heads/svn) = ') ('\t     x') 
          (word_part.EscapedLiteral
            token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:175)
          ) ('(git rev-parse --verify refs/remotes/origin/trunk) &&\n') ('\ttest x') 
          (word_part.EscapedLiteral
            token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:178)
          ) ('(git rev-parse --verify refs/heads/svn^2) = ') ('\t     x') 
          (word_part.EscapedLiteral
            token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:182)
          ) ('(git rev-parse --verify refs/heads/merge) &&\n') 
          ("\tgit cat-file commit refs/heads/svn^ | grep '^friend") (Id.Lit_Other '$') ("'\n") ('\t')
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'verify merge commit message' span_id:194))} 
      {
        (DQ ('\n') ('\tgit rev-list --pretty=raw -1 refs/heads/svn | ') ('\t  grep ') 
          (word_part.EscapedLiteral
            token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:202)
          ) ("    Merge branch 'merge' into svn") 
          (word_part.EscapedLiteral
            token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:204)
          ) ('\n') ('\t')
        )
      }
    )
    (C {(test_done)})
  ]
)