(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:TEST_NO_CREATE_REPO)
          op: assign_op.Equal
          rhs: {<NoThanks>}
          spids: [16]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RETRY_TIMEOUT)
          op: assign_op.Equal
          rhs: {<60>}
          spids: [26]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:P4D_TIMEOUT)
          op: assign_op.Equal
          rhs: {<300>}
          spids: [36]
        )
      ]
    )
    (C {<.>} {<'./test-lib.sh'>})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [(command.Pipeline children:[(C {<test_have_prereq>} {<PYTHON>})] negated:T)]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:skip_all)
                  op: assign_op.Equal
                  rhs: {(SQ <'skipping git p4 tests; python not available'>)}
                  spids: [56]
                )
              ]
            )
            (C {<test_done>})
          ]
          spids: [45 53]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (command.Subshell
          child: (command.AndOr ops:[Id.Op_DAmp] children:[(C {<p4>} {<-h>}) (C {<p4d>} {<-h>})])
          redirects: [
            (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})
            (redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})
          ]
        )
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:skip_all)
                  op: assign_op.Equal
                  rhs: {(SQ <'skipping git p4 tests; no p4 or p4d'>)}
                  spids: [91]
                )
              ]
            )
            (C {<test_done>})
          ]
        )
      ]
    )
    (command.ShFunction
      name: native_path
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:path)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                      spids: [131]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.AndOr
                              ops: [Id.Op_DAmp]
                              children: [
                                (C {<test_have_prereq>} {<CYGWIN>})
                                (command.Pipeline
                                  children: [(C {<p4>} {<-V>}) (C {<grep>} {<-q>} {<CYGWIN>})]
                                  negated: T
                                )
                              ]
                            )
                          ]
                        )
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:path)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (command_sub
                                    left_token: <Id.Left_DollarParen '$('>
                                    child: 
                                      (C {<cygpath>} {<--windows>} {(DQ ($ Id.VSub_DollarName '$path'))})
                                  )
                                }
                              spids: [165]
                            )
                          ]
                        )
                      ]
                      spids: [139 162]
                    )
                  ]
                  else_action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:path)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (C {<test-path-utils>} {<real_path>} 
                                    {(DQ ($ Id.VSub_DollarName '$path'))}
                                  )
                              )
                            }
                          spids: [180]
                        )
                      ]
                    )
                  ]
                )
                (C {<echo>} {(DQ ($ Id.VSub_DollarName '$path'))})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: time_in_seconds
      body: 
        (BraceGroup
          children: [
            (command.Subshell
              child: 
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (C {<cd>} {<'/'>})
                    (C {(DQ ($ Id.VSub_DollarName '$PYTHON_PATH'))} {<-c>} 
                      {(SQ <'import time; print(int(time.time()))'>)}
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:testid)
          op: assign_op.Equal
          rhs: 
            {
              (braced_var_sub
                token: <Id.VSub_Name this_test>
                suffix_op: (suffix_op.Unary tok:<Id.VOp1_Pound '#'> arg_word:{<t>})
              )
            }
          spids: [265]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:git_p4_test_start)
          op: assign_op.Equal
          rhs: {<9800>}
          spids: [272]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:P4DPORT)
          op: assign_op.Equal
          rhs: 
            {
              (word_part.ArithSub
                anode: 
                  (arith_expr.Binary
                    op_id: Id.Arith_Plus
                    left: {<Id.Lit_Digits 10669>}
                    right: 
                      (arith_expr.Binary
                        op_id: Id.Arith_Minus
                        left: {($ Id.VSub_DollarName '$testid')}
                        right: {($ Id.VSub_DollarName '$git_p4_test_start')}
                      )
                  )
              )
            }
          spids: [275]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:P4PORT)
          op: assign_op.Equal
          rhs: {<localhost> <Id.Lit_Colon ':'> ($ Id.VSub_DollarName '$P4DPORT')}
          spids: [292]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:P4CLIENT)
          op: assign_op.Equal
          rhs: {<client>}
          spids: [297]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:P4USER)
          op: assign_op.Equal
          rhs: {<author>}
          spids: [300]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:P4EDITOR)
          op: assign_op.Equal
          rhs: {<true>}
          spids: [303]
        )
      ]
    )
    (C {<unset>} {<P4CHARSET>})
    (C {<export>} {<P4PORT>} {<P4CLIENT>} {<P4USER>} {<P4EDITOR>} {<P4CHARSET>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:db)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$TRASH_DIRECTORY') <'/db'>)}
          spids: [323]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:cli)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$TRASH_DIRECTORY') <'/cli'>)}
          spids: [329]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:git)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$TRASH_DIRECTORY') <'/git'>)}
          spids: [335]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:pidfile)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$TRASH_DIRECTORY') <'/p4d.pid'>)}
          spids: [341]
        )
      ]
    )
    (command.ShFunction
      name: cleanup
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [(C {<test>} {<-f>} {(DQ ($ Id.VSub_DollarName '$pidfile'))})]
                    )
                  action: [
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (command.Simple
                          words: [
                            {<kill>}
                            {<-9>}
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: (C {<cat>} {(DQ ($ Id.VSub_DollarName '$pidfile'))})
                              )
                            }
                          ]
                          redirects: [
                            (redir
                              op: <Id.Redir_Great '2>'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<'/dev/null'>}
                            )
                          ]
                          do_fork: T
                        )
                        (command.ControlFlow
                          token: <Id.ControlFlow_Exit exit>
                          arg_word: {<255>}
                        )
                      ]
                    )
                  ]
                  spids: [359 370]
                )
              ]
            )
          ]
        )
    )
    (C {<trap>} {<cleanup>} {<EXIT>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:TMPDIR)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$TRASH_DIRECTORY'))}
          spids: [415]
        )
      ]
    )
    (C {<export>} {<TMPDIR>})
    (command.ShFunction
      name: start_p4d
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp]
              children: [
                (C {<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName '$db'))} 
                  {(DQ ($ Id.VSub_DollarName '$cli'))} {(DQ ($ Id.VSub_DollarName '$git'))}
                )
                (C {<rm>} {<-f>} {(DQ ($ Id.VSub_DollarName '$pidfile'))})
                (command.Subshell
                  child: 
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<cd>} {(DQ ($ Id.VSub_DollarName '$db'))})
                        (BraceGroup
                          children: [
                            (command.Sentence
                              child: 
                                (C {<p4d>} {<-q>} {<-p>} {($ Id.VSub_DollarName '$P4DPORT')} 
                                  {(DQ ($ Id.VSub_At '$@'))}
                                )
                              terminator: <Id.Op_Amp _>
                            )
                            (command.Simple
                              words: [{<echo>} {($ Id.VSub_Bang '$!')}]
                              redirects: [
                                (redir
                                  op: <Id.Redir_Great '>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {(DQ ($ Id.VSub_DollarName '$pidfile'))}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                        )
                      ]
                    )
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:i)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (braced_var_sub
                            token: <Id.VSub_Name P4D_START_PATIENCE>
                            suffix_op: 
                              (suffix_op.Unary
                                tok: <Id.VTest_ColonHyphen ':-'>
                                arg_word: {<300>}
                              )
                          )
                        }
                      spids: [532]
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:pid)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<cat>} {(DQ ($ Id.VSub_DollarName '$pidfile'))})
                      )
                    }
                  spids: [540]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:timeout)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (word_part.ArithSub
                        anode: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Plus
                            left: 
                              {
                                (command_sub
                                  left_token: <Id.Left_DollarParen '$('>
                                  child: (C {<time_in_seconds>})
                                )
                              }
                            right: {($ Id.VSub_DollarName '$P4D_TIMEOUT')}
                          )
                      )
                    }
                  spids: [551]
                )
              ]
            )
            (command.Sentence
              child: 
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: (condition.Shell commands:[(C {<true>})])
                  body: 
                    (command.DoGroup
                      children: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (C {<test>} 
                                      {
                                        (command_sub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: (C {<time_in_seconds>})
                                        )
                                      } {<-gt>} {($ Id.VSub_DollarName '$timeout')}
                                    )
                                  ]
                                )
                              action: [
                                (C {<kill>} {<-9>} {($ Id.VSub_DollarName '$pid')})
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Exit exit>
                                  arg_word: {<1>}
                                )
                              ]
                              spids: [572 585]
                            )
                          ]
                        )
                        (C {<sleep>} {<1>})
                      ]
                    )
                )
              terminator: <Id.Op_Amp _>
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:watchdog_pid)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Bang '$!')}
                  spids: [613]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:ready)
                  op: assign_op.Equal
                  rhs: (word.Empty)
                  spids: [618]
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [(C {<test>} {($ Id.VSub_DollarName '$i')} {<-gt>} {<0>})]
                )
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Simple
                                  words: [{<p4>} {<info>}]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_Great '>'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {<'/dev/null'>}
                                    )
                                    (redir
                                      op: <Id.Redir_GreatAnd '2>&'>
                                      loc: (redir_loc.Fd fd:2)
                                      arg: {<1>}
                                    )
                                  ]
                                  do_fork: T
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:ready)
                                  op: assign_op.Equal
                                  rhs: {<true>}
                                  spids: [655]
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Break break>
                            )
                          ]
                          spids: [639 652]
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (command.Simple
                          words: [{<kill>} {<-0>} {($ Id.VSub_DollarName '$pid')}]
                          redirects: [
                            (redir
                              op: <Id.Redir_Great '2>'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<'/dev/null'>}
                            )
                          ]
                          do_fork: T
                        )
                        (command.ControlFlow
                          token: <Id.ControlFlow_Break break>
                        )
                      ]
                    )
                    (C {<echo>} {<waiting>} {<Id.KW_For for>} {<p4d>} {<to>} {<start>})
                    (C {<sleep>} {<1>})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:i)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (word_part.ArithSub
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Minus
                                    left: {($ Id.VSub_DollarName '$i')}
                                    right: {<Id.Lit_Digits 1>}
                                  )
                              )
                            }
                          spids: [701]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [(C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$ready'))})]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
                  spids: [718 729]
                )
              ]
            )
            (C {<p4_add_user>} {<author>})
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<client_view>} {(DQ <'//depot/... //client/...'>)})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<0>}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: p4_add_user
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:name)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_Number '$1')}
                      spids: [784]
                    )
                  ]
                )
                (command.Simple
                  words: [{<p4>} {<user>} {<-f>} {<-i>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_DLessDash '<<-'>
                      loc: (redir_loc.Fd fd:0)
                      arg: 
                        (redir_param.HereDoc
                          here_begin: {<EOF>}
                          here_end_span_id: 811
                          stdin_parts: [
                            <'User: '>
                            ($ Id.VSub_DollarName '$name')
                            <'\n'>
                            <'Email: '>
                            ($ Id.VSub_DollarName '$name')
                            <'@example.com\n'>
                            <'FullName: Dr. '>
                            ($ Id.VSub_DollarName '$name')
                            <'\n'>
                          ]
                        )
                    )
                  ]
                  do_fork: T
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: p4_add_job
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [{<p4>} {<job>} {<-f>} {<-i>}]
              redirects: [
                (redir
                  op: <Id.Redir_DLessDash '<<-'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.HereDoc
                      here_begin: {<EOF>}
                      here_end_span_id: 841
                      stdin_parts: [
                        <'Job: '>
                        ($ Id.VSub_Number '$1')
                        <'\n'>
                        <'Status: open\n'>
                        <'User: dummy\n'>
                        <'Description:\n'>
                      ]
                    )
                )
              ]
              do_fork: T
            )
          ]
        )
    )
    (command.ShFunction
      name: retry_until_success
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:timeout)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (word_part.ArithSub
                        anode: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Plus
                            left: 
                              {
                                (command_sub
                                  left_token: <Id.Left_DollarParen '$('>
                                  child: (C {<time_in_seconds>})
                                )
                              }
                            right: {($ Id.VSub_DollarName '$RETRY_TIMEOUT')}
                          )
                      )
                    }
                  spids: [853]
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_Until until>
              cond: 
                (condition.Shell
                  commands: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (command.Simple
                          words: [{(DQ ($ Id.VSub_At '$@'))}]
                          redirects: [
                            (redir
                              op: <Id.Redir_Great '2>'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<'/dev/null'>}
                            )
                          ]
                          do_fork: T
                        )
                        (C {<test>} 
                          {
                            (command_sub
                              left_token: <Id.Left_DollarParen '$('>
                              child: (C {<time_in_seconds>})
                            )
                          } {<-gt>} {($ Id.VSub_DollarName '$timeout')}
                        )
                      ]
                    )
                  ]
                )
              body: (command.DoGroup children:[(C {<sleep>} {<1>})])
            )
          ]
        )
    )
    (command.ShFunction
      name: retry_until_fail
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:timeout)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (word_part.ArithSub
                        anode: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Plus
                            left: 
                              {
                                (command_sub
                                  left_token: <Id.Left_DollarParen '$('>
                                  child: (C {<time_in_seconds>})
                                )
                              }
                            right: {($ Id.VSub_DollarName '$RETRY_TIMEOUT')}
                          )
                      )
                    }
                  spids: [909]
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_Until until>
              cond: 
                (condition.Shell
                  commands: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (command.Pipeline
                          children: [
                            (command.Simple
                              words: [{(DQ ($ Id.VSub_At '$@'))}]
                              redirects: [
                                (redir
                                  op: <Id.Redir_Great '2>'>
                                  loc: (redir_loc.Fd fd:2)
                                  arg: {<'/dev/null'>}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                          negated: T
                        )
                        (C {<test>} 
                          {
                            (command_sub
                              left_token: <Id.Left_DollarParen '$('>
                              child: (C {<time_in_seconds>})
                            )
                          } {<-gt>} {($ Id.VSub_DollarName '$timeout')}
                        )
                      ]
                    )
                  ]
                )
              body: (command.DoGroup children:[(C {<sleep>} {<1>})])
            )
          ]
        )
    )
    (command.ShFunction
      name: kill_p4d
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:pid)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<cat>} {(DQ ($ Id.VSub_DollarName '$pidfile'))})
                      )
                    }
                  spids: [967]
                )
              ]
            )
            (C {<retry_until_fail>} {<kill>} {($ Id.VSub_DollarName '$pid')})
            (C {<retry_until_fail>} {<kill>} {<-9>} {($ Id.VSub_DollarName '$pid')})
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp]
              children: [
                (command.Simple
                  words: [{<test_must_fail>} {<kill>} {($ Id.VSub_DollarName '$pid')}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                    (redir
                      op: <Id.Redir_GreatAnd '2>&'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<1>}
                    )
                  ]
                  do_fork: T
                )
                (C {<rm>} {<-rf>} {(DQ ($ Id.VSub_DollarName '$db'))} {(DQ ($ Id.VSub_DollarName '$cli'))} 
                  {(DQ ($ Id.VSub_DollarName '$pidfile'))}
                )
                (C {<retry_until_fail>} {<kill>} {<-9>} {($ Id.VSub_DollarName '$watchdog_pid')})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: cleanup_git
      body: 
        (BraceGroup
          children: [
            (C {<retry_until_success>} {<rm>} {<-r>} {(DQ ($ Id.VSub_DollarName '$git'))})
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<test_must_fail>} {<test>} {<-d>} {(DQ ($ Id.VSub_DollarName '$git'))})
                (C {<retry_until_success>} {<mkdir>} {(DQ ($ Id.VSub_DollarName '$git'))})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: marshal_dump
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:what)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_Number '$1')}
                      spids: [1093]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:line)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (braced_var_sub
                            token: <Id.VSub_Number 2>
                            suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:{<1>})
                          )
                        }
                      spids: [1099]
                    )
                  ]
                )
                (command.Simple
                  words: [{<cat>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(DQ ($ Id.VSub_DollarName '$TRASH_DIRECTORY') <'/marshal-dump.py'>)}
                    )
                    (redir
                      op: <Id.Redir_DLessDash '<<-'>
                      loc: (redir_loc.Fd fd:0)
                      arg: 
                        (redir_param.HereDoc
                          here_begin: {<EOF>}
                          here_end_span_id: 1133
                          stdin_parts: [
                            <'import marshal\n'>
                            <'import sys\n'>
                            <'instream = getattr(sys.stdin, \'buffer\', sys.stdin)\n'>
                            <'for i in range('>
                            ($ Id.VSub_DollarName '$line')
                            <'):\n'>
                            <'    d = marshal.load(instream)\n'>
                            <'print(d[b\''>
                            ($ Id.VSub_DollarName '$what')
                            <'\'].decode(\'utf-8\'))\n'>
                          ]
                        )
                    )
                  ]
                  do_fork: T
                )
                (C {(DQ ($ Id.VSub_DollarName '$PYTHON_PATH'))} 
                  {(DQ ($ Id.VSub_DollarName '$TRASH_DIRECTORY') <'/marshal-dump.py'>)}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: client_view
      body: 
        (BraceGroup
          children: [
            (command.Pipeline
              children: [
                (command.Subshell
                  child: 
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (command.Simple
                          words: [{<cat>}]
                          redirects: [
                            (redir
                              op: <Id.Redir_DLessDash '<<-'>
                              loc: (redir_loc.Fd fd:0)
                              arg: 
                                (redir_param.HereDoc
                                  here_begin: {<EOF>}
                                  here_end_span_id: 1195
                                  stdin_parts: [
                                    <'Client: '>
                                    ($ Id.VSub_DollarName '$P4CLIENT')
                                    <'\n'>
                                    <'Description: '>
                                    ($ Id.VSub_DollarName '$P4CLIENT')
                                    <'\n'>
                                    <'Root: '>
                                    ($ Id.VSub_DollarName '$cli')
                                    <'\n'>
                                    <'AltRoots: '>
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: (C {<native_path>} {(DQ ($ Id.VSub_DollarName '$cli'))})
                                    )
                                    <'\n'>
                                    <'LineEnd: unix\n'>
                                    <'View:\n'>
                                  ]
                                )
                            )
                          ]
                          do_fork: T
                        )
                        (C {<printf>} 
                          {(DQ <Id.Lit_BadBackslash '\\'> <'t%s'> <Id.Lit_BadBackslash '\\'> <n>)} {(DQ ($ Id.VSub_At '$@'))}
                        )
                      ]
                    )
                )
                (C {<p4>} {<client>} {<-i>})
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: is_cli_file_writeable
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:file)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                      spids: [1240]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.AndOr
                              ops: [Id.Op_DAmp]
                              children: [
                                (C {<test_have_prereq>} {<CYGWIN>})
                                (command.Pipeline
                                  children: [(C {<p4>} {<-V>}) (C {<grep>} {<-q>} {<CYGWIN>})]
                                  negated: F
                                )
                              ]
                            )
                          ]
                        )
                      action: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:stat)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: 
                                          (C {<stat>} 
                                            {<--format> <Id.Lit_Equals '='> <Id.Lit_Other '%'> <a>} {(DQ ($ Id.VSub_DollarName '$file'))}
                                          )
                                      )
                                    }
                                  spids: [1272]
                                )
                              ]
                            )
                            (C {<test>} {($ Id.VSub_DollarName '$stat')} {<Id.Lit_Equals '='>} {<644>})
                          ]
                        )
                      ]
                      spids: [1248 1269]
                    )
                  ]
                  else_action: [(C {<test>} {<-w>} {(DQ ($ Id.VSub_DollarName '$file'))})]
                )
              ]
            )
          ]
        )
    )
  ]
)