(CommandList
  children: [
    (C {(.)} {(./test-lib.sh)})
    (If
      arms: [
        (if_arm
          cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name '$NO_SVN_TESTS'))})]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:skip_all)
                  op: Equal
                  rhs: {(SQ <'skipping git svn tests, NO_SVN_TESTS defined'>)}
                  spids: [18]
                )
              ]
              spids: [18]
            )
            (C {(test_done)})
          ]
          spids: [16777215 15]
        )
      ]
      spids: [16777215 26]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (Pipeline children:[(C {(test_have_prereq)} {(PERL)})] negated:True)
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:skip_all)
                  op: Equal
                  rhs: {(SQ <'skipping git svn tests, perl not available'>)}
                  spids: [40]
                )
              ]
              spids: [40]
            )
            (C {(test_done)})
          ]
          spids: [16777215 37]
        )
      ]
      spids: [16777215 48]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:GIT_DIR)
          op: Equal
          rhs: {($ VSub_Name '$PWD') (/.git)}
          spids: [51]
        )
      ]
      spids: [51]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:GIT_SVN_DIR)
          op: Equal
          rhs: {($ VSub_Name '$GIT_DIR') (/svn/refs/remotes/git-svn)}
          spids: [55]
        )
      ]
      spids: [55]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:SVN_TREE)
          op: Equal
          rhs: {($ VSub_Name '$GIT_SVN_DIR') (/svn-tree)}
          spids: [59]
        )
      ]
      spids: [59]
    )
    (SimpleCommand
      words: [{(svn)}]
      redirects: [
        (Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[66])
        (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[69])
      ]
    )
    (If
      arms: [
        (if_arm
          cond: [(C {(test)} {($ VSub_QMark '$?')} {(-ne)} {(1)})]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:skip_all)
                  op: Equal
                  rhs: {(SQ <'skipping git svn tests, svn not found'>)}
                  spids: [85]
                )
              ]
              spids: [85]
            )
            (C {(test_done)})
          ]
          spids: [16777215 82]
        )
      ]
      spids: [16777215 93]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:svnrepo)
          op: Equal
          rhs: {($ VSub_Name '$PWD') (/svnrepo)}
          spids: [96]
        )
      ]
      spids: [96]
    )
    (C {(export)} {(svnrepo)})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:svnconf)
          op: Equal
          rhs: {($ VSub_Name '$PWD') (/svnconf)}
          spids: [104]
        )
      ]
      spids: [104]
    )
    (C {(export)} {(svnconf)})
    (SimpleCommand
      words: [
        {(perl)}
        {(-w)}
        {(-e)}
        {
          (DQ ('\n') ('use SVN::Core;\n') ('use SVN::Repos;\n') 
            (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("SVN::Core::VERSION gt '1.1.0' or exit(42);\n") ('system(qw/svnadmin create --fs-type fsfs/, ') 
            (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('ENV{svnrepo}) == 0 or exit(41);\n')
          )
        }
      ]
      redirects: [
        (Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(3)} spids:[130])
        (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(4)} spids:[133])
      ]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:x) op:Equal rhs:{($ VSub_QMark '$?')} spids:[136])]
      spids: [136]
    )
    (If
      arms: [
        (if_arm
          cond: [(C {(test)} {($ VSub_Name '$x')} {(-ne)} {(0)})]
          action: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: (C {(test)} {($ VSub_Name '$x')} {(-eq)} {(42)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:skip_all)
                          op: Equal
                          rhs: {(SQ <'Perl SVN libraries must be >= 1.1.0'>)}
                          spids: [166]
                        )
                      ]
                      spids: [166]
                    )
                  ]
                  spids: [16777215 163]
                )
                (if_arm
                  cond: [
                    (Sentence
                      child: (C {(test)} {($ VSub_Name '$x')} {(-eq)} {(41)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:skip_all)
                          op: Equal
                          rhs: {(SQ <'svnadmin failed to create fsfs repository'>)}
                          spids: [186]
                        )
                      ]
                      spids: [186]
                    )
                  ]
                  spids: [172 183]
                )
              ]
              else_action: [
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:skip_all)
                      op: Equal
                      rhs: {(SQ <'Perl SVN libraries not found or unusable'>)}
                      spids: [195]
                    )
                  ]
                  spids: [195]
                )
              ]
              spids: [192 201]
            )
            (C {(test_done)})
          ]
          spids: [16777215 149]
        )
      ]
      spids: [16777215 206]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:rawsvnrepo)
          op: Equal
          rhs: {(DQ ($ VSub_Name '$svnrepo'))}
          spids: [209]
        )
      ]
      spids: [209]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:svnrepo)
          op: Equal
          rhs: {(DQ ('file://') ($ VSub_Name '$svnrepo'))}
          spids: [214]
        )
      ]
      spids: [214]
    )
    (FuncDef
      name: poke
      body: 
        (BraceGroup
          children: [(C {(test-chmtime)} {(Lit_Other '+') (1)} {(DQ ($ VSub_Number '$1'))})]
          spids: [225]
        )
      spids: [221 224]
    )
    (FuncDef
      name: svn_cmd
      body: 
        (BraceGroup
          children: [
            (AndOr
              children: [
                (C {(Lit_Other '[')} {(-d)} {(DQ ($ VSub_Name '$svnconf'))} {(Lit_Other ']')})
                (C {(mkdir)} {(DQ ($ VSub_Name '$svnconf'))})
              ]
              op_id: Op_DPipe
            )
            (Sentence
              child: 
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:orig_svncmd)
                      op: Equal
                      rhs: {(DQ ($ VSub_Number '$1'))}
                      spids: [276]
                    )
                  ]
                  spids: [276]
                )
              terminator: <Op_Semi ';'>
            )
            (C {(shift)})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$orig_svncmd'))} {(Lit_Other ']')})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(C {(svn)}) (ControlFlow token:<ControlFlow_Return return>)]
                  spids: [16777215 298]
                )
              ]
              spids: [16777215 307]
            )
            (C {(svn)} {(DQ ($ VSub_Name '$orig_svncmd'))} {(--config-dir)} 
              {(DQ ($ VSub_Name '$svnconf'))} {(DQ ($ VSub_At '$@'))}
            )
          ]
          spids: [254]
        )
      spids: [249 253]
    )
    (FuncDef
      name: maybe_start_httpd
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:loc)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 1>
                        suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(svn)})
                        spids: [338 342]
                      )
                    }
                  spids: [337]
                )
              ]
              spids: [337]
            )
            (C {(test_tristate)} {(GIT_SVN_TEST_HTTPD)})
            (Case
              to_match: {($ VSub_Name '$GIT_SVN_TEST_HTTPD')}
              arms: [
                (case_arm
                  pat_list: [{(true)}]
                  action: [
                    (C {(.)} {(DQ ($ VSub_Name '$TEST_DIRECTORY')) (/lib-httpd.sh)})
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:LIB_HTTPD_SVN)
                          op: Equal
                          rhs: {(DQ ($ VSub_Name '$loc'))}
                          spids: [370]
                        )
                      ]
                      spids: [370]
                    )
                    (C {(start_httpd)})
                  ]
                  spids: [358 359 379 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (FuncDef
                      name: stop_httpd
                      body: (BraceGroup children:[(C {(Lit_Other ':')} {(noop)})] spids:[391])
                      spids: [386 390]
                    )
                  ]
                  spids: [382 383 402 16777215]
                )
              ]
              spids: [351 355 405]
            )
          ]
          spids: [334]
        )
      spids: [329 333]
    )
    (FuncDef
      name: convert_to_rev_db
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(perl)} {(-w)} {(--)} {(-)} {(DQ ($ VSub_At '$@'))}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: 
                    {('use strict;\n') 
                      ('@ARGV == 2 or die "usage: convert_to_rev_db <input> <output>";\n') ('open my $wr, \'+>\', $ARGV[1] or die "$!: couldn\'t open: $ARGV[1]";\n') 
                      ('open my $rd, \'<\', $ARGV[0] or die "$!: couldn\'t open: $ARGV[0]";\n') ('my $size = (stat($rd))[7];\n') ('($size % 24) == 0 or die "Inconsistent size: $size";\n') 
                      ('while (sysread($rd, my $buf, 24) == 24) {\n') ("\tmy ($r, $c) = unpack('NH40', $buf);\n") ('\tmy $offset = $r * 41;\n') 
                      ('\tseek $wr, 0, 2 or die $!;\n') ('\tmy $pos = tell $wr;\n') ('\tif ($pos < $offset) {\n') 
                      ('\t\tfor (1 .. (($offset - $pos) / 41)) {\n') ('\t\t\tprint $wr ((\'0\' x 40),"\\n") or die $!;\n') ('\t\t}\n') ('\t}\n') 
                      ('\tseek $wr, $offset, 0 or die $!;\n') ('\tprint $wr $c,"\\n" or die $!;\n') ('}\n') ('close $wr or die $!;\n') ('close $rd or die $!;\n')
                    }
                  do_expansion: False
                  here_end: EOF
                  was_filled: True
                  spids: [430]
                )
              ]
            )
          ]
          spids: [415]
        )
      spids: [410 414]
    )
    (FuncDef
      name: require_svnserve
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-z)} {(DQ ($ VSub_Name '$SVNSERVE_PORT'))})]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:skip_all)
                          op: Equal
                          rhs: {(SQ <'skipping svnserve test. (set $SVNSERVE_PORT to enable)'>)}
                          spids: [459]
                        )
                      ]
                      spids: [459]
                    )
                    (C {(test_done)})
                  ]
                  spids: [16777215 456]
                )
              ]
              spids: [16777215 468]
            )
          ]
          spids: [442]
        )
      spids: [437 441]
    )
    (FuncDef
      name: start_svnserve
      body: 
        (BraceGroup
          children: [
            (Sentence
              child: 
                (C {(svnserve)} {(--listen-port)} {($ VSub_Name '$SVNSERVE_PORT')} {(--root)} 
                  {(DQ ($ VSub_Name '$rawsvnrepo'))} {(--listen-once)} {(--listen-host)} {(127.0.0.1)}
                )
              terminator: <Op_Amp '&'>
            )
          ]
          spids: [478]
        )
      spids: [473 477]
    )
    (FuncDef
      name: prepare_a_utf8_locale
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:a_utf8_locale)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (Pipeline
                                children: [
                                  (C {(locale)} {(-a)})
                                  (C {(sed)} {(-n)} 
                                    {(SQ <'/\\.[uU][tT][fF]-*8$/{\n'> <'\tp\n'> <'\tq\n'> <'}'>)}
                                  )
                                ]
                                negated: False
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [519 536]
                      )
                    }
                  spids: [518]
                )
              ]
              spids: [518]
            )
            (If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name '$a_utf8_locale'))})]
                  action: [(C {(test_set_prereq)} {(UTF8)})]
                  spids: [16777215 550]
                )
              ]
              else_action: [(C {(say)} {(DQ ('# UTF-8 locale not available, some tests are skipped'))})]
              spids: [558 568]
            )
          ]
          spids: [515]
        )
      spids: [510 514]
    )
  ]
)