(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'git svn dcommit handles merges'>)}
          spids: [13]
        )
      ]
    )
    (C {<.>} {<'./lib-git-svn.sh'>})
    (command.ShFunction
      name: big_text_block
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.MultiLine
                      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'>
                      ]
                    )
                )
              ]
              do_fork: T
            )
          ]
        )
    )
    (C {<test_expect_success>} {(SQ <'setup svn repository'>)} 
      {
        (SQ <'\n'> <'\tsvn_cmd co "$svnrepo" mysvnwork &&\n'> <'\tmkdir -p mysvnwork/trunk &&\n'> 
          <'\t(\n'> <'\t\tcd mysvnwork &&\n'> <'\t\tbig_text_block >>trunk/README &&\n'> <'\t\tsvn_cmd add trunk &&\n'> 
          <'\t\tsvn_cmd ci -m "first commit" trunk\n'> <'\t)\n'> <'\t'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'setup git mirror and merge'>)} 
      {
        (SQ <'\n'> <'\tgit svn init "$svnrepo" -t tags -T trunk -b branches &&\n'> 
          <'\tgit svn fetch &&\n'> <'\tgit checkout -b svn remotes/origin/trunk &&\n'> <'\tgit checkout -b merge &&\n'> 
          <'\techo new file > new_file &&\n'> <'\tgit add new_file &&\n'> <'\tgit commit -a -m "New file" &&\n'> <'\techo hello >> README &&\n'> 
          <'\tgit commit -a -m "hello" &&\n'> <'\techo add some stuff >> new_file &&\n'> <'\tgit commit -a -m "add some stuff" &&\n'> 
          <'\tgit checkout svn &&\n'> <'\tmv -f README tmp &&\n'> <'\techo friend > README &&\n'> <'\tcat tmp >> README &&\n'> 
          <'\tgit commit -a -m "friend" &&\n'> <'\tgit merge merge\n'> <'\t'>
        )
      }
    )
    (C {<test_debug>} {(SQ <'gitk --all & sleep 1'>)})
    (C {<test_expect_success>} {(SQ <'verify pre-merge ancestry'>)} 
      {
        (DQ <'\n'> <'\ttest x'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) 
          <'(git rev-parse --verify refs/heads/svn^2) = '> <'\t     x'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) 
          <'(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 <'git svn dcommit merges'>)} 
      {(DQ <'\n'> <'\tgit svn dcommit\n'> <'\t'>)}
    )
    (C {<test_debug>} {(SQ <'gitk --all & sleep 1'>)})
    (C {<test_expect_success>} {(SQ <'verify post-merge ancestry'>)} 
      {
        (DQ <'\n'> <'\ttest x'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) 
          <'(git rev-parse --verify refs/heads/svn) = '> <'\t     x'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) 
          <'(git rev-parse --verify refs/remotes/origin/trunk) &&\n'> <'\ttest x'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) 
          <'(git rev-parse --verify refs/heads/svn^2) = '> <'\t     x'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) 
          <'(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 <'verify merge commit message'>)} 
      {
        (DQ <'\n'> <'\tgit rev-list --pretty=raw -1 refs/heads/svn | '> <'\t  grep '> 
          (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <'    Merge branch \'merge\' into svn'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
          <'\n'> <'\t'>
        )
      }
    )
    (C {<test_done>})
  ]
)