(command.CommandList children: [ (C {<.>} {<'./test-lib.sh'>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [(C {<test>} {<-n>} {(DQ ($ Id.VSub_DollarName '$NO_SVN_TESTS'))})] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip_all) op: assign_op.Equal rhs: {(SQ <'skipping git svn tests, NO_SVN_TESTS defined'>)} spids: [18] ) ] ) (C {<test_done>}) ] spids: [5 15] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children:[(C {<test_have_prereq>} {<PERL>})] negated:T) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip_all) op: assign_op.Equal rhs: {(SQ <'skipping git svn tests, perl not available'>)} spids: [40] ) ] ) (C {<test_done>}) ] spids: [28 37] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_DIR) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$PWD') <'/.git'>} spids: [51] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_SVN_DIR) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$GIT_DIR') <'/svn/refs/remotes/git-svn'>} spids: [55] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SVN_TREE) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$GIT_SVN_DIR') <'/svn-tree'>} spids: [59] ) ] ) (command.Simple words: [{<svn>}] 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 ) (command.If arms: [ (if_arm cond: (condition.Shell commands:[(C {<test>} {($ Id.VSub_QMark '$?')} {<-ne>} {<1>})]) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip_all) op: assign_op.Equal rhs: {(SQ <'skipping git svn tests, svn not found'>)} spids: [85] ) ] ) (C {<test_done>}) ] spids: [72 82] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:svnrepo) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$PWD') <'/svnrepo'>} spids: [96] ) ] ) (C {<export>} {<svnrepo>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:svnconf) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$PWD') <'/svnconf'>} spids: [104] ) ] ) (C {<export>} {<svnconf>}) (command.Simple words: [ {<perl>} {<-w>} {<-e>} { (DQ <'\n'> <'use SVN::Core;\n'> <'use SVN::Repos;\n'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'SVN::Core::VERSION gt \'1.1.0\' or exit(42);\n'> <'system(qw/svnadmin create --fs-type fsfs/, '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'ENV{svnrepo}) == 0 or exit(41);\n'> ) } ] redirects: [ (redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<3>}) (redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<4>}) ] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:x) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [136] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands:[(C {<test>} {($ Id.VSub_DollarName '$x')} {<-ne>} {<0>})]) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<test>} {($ Id.VSub_DollarName '$x')} {<-eq>} {<42>}) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip_all) op: assign_op.Equal rhs: {(SQ <'Perl SVN libraries must be >= 1.1.0'>)} spids: [166] ) ] ) ] spids: [152 163] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<test>} {($ Id.VSub_DollarName '$x')} {<-eq>} {<41>}) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip_all) op: assign_op.Equal rhs: {(SQ <'svnadmin failed to create fsfs repository'>)} spids: [186] ) ] ) ] spids: [172 183] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip_all) op: assign_op.Equal rhs: {(SQ <'Perl SVN libraries not found or unusable'>)} spids: [195] ) ] ) ] ) (C {<test_done>}) ] spids: [139 149] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:rawsvnrepo) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$svnrepo'))} spids: [209] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:svnrepo) op: assign_op.Equal rhs: {(DQ <'file://'> ($ Id.VSub_DollarName '$svnrepo'))} spids: [214] ) ] ) (command.ShFunction name: poke body: (BraceGroup children: [(C {<test-chmtime>} {<Id.Lit_Other '+'> <1>} {(DQ ($ Id.VSub_Number '$1'))})] ) ) (command.ShFunction name: svn_cmd body: (BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {<-d>} {(DQ ($ Id.VSub_DollarName '$svnconf'))} {<Id.Lit_RBracket ']'>} ) (C {<mkdir>} {(DQ ($ Id.VSub_DollarName '$svnconf'))}) ] ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:orig_svncmd) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [276] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$orig_svncmd'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<svn>}) (command.ControlFlow token:<Id.ControlFlow_Return return>)] spids: [285 298] ) ] ) (C {<svn>} {(DQ ($ Id.VSub_DollarName '$orig_svncmd'))} {<--config-dir>} {(DQ ($ Id.VSub_DollarName '$svnconf'))} {(DQ ($ Id.VSub_At '$@'))} ) ] ) ) (command.ShFunction name: maybe_start_httpd body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:loc) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Number 1> suffix_op: (suffix_op.Unary tok:<Id.VTest_Hyphen -> arg_word:{<svn>}) ) } spids: [337] ) ] ) (C {<test_tristate>} {<GIT_SVN_TEST_HTTPD>}) (command.Case to_match: {($ Id.VSub_DollarName '$GIT_SVN_TEST_HTTPD')} arms: [ (case_arm pat_list: [{<true>}] action: [ (C {<.>} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) <'/lib-httpd.sh'>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LIB_HTTPD_SVN) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$loc'))} spids: [370] ) ] ) (C {<start_httpd>}) ] spids: [358 359 379 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.ShFunction name: stop_httpd body: (BraceGroup children:[(C {<Id.Lit_Colon ':'>} {<noop>})]) ) ] spids: [382 383 402 -1] ) ] ) ] ) ) (command.ShFunction name: convert_to_rev_db body: (BraceGroup children: [ (command.Simple words: [{<perl>} {<-w>} {<-->} {<->} {(DQ ($ Id.VSub_At '$@'))}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'>) <OF>} here_end_span_id: 455 stdin_parts: [ <'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_fork: T ) ] ) ) (command.ShFunction name: require_svnserve body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [(C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$SVNSERVE_PORT'))})] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip_all) op: assign_op.Equal rhs: {(SQ <'skipping svnserve test. (set $SVNSERVE_PORT to enable)'>)} spids: [481] ) ] ) (C {<test_done>}) ] spids: [467 478] ) ] ) ] ) ) (command.ShFunction name: start_svnserve body: (BraceGroup children: [ (command.Sentence child: (C {<svnserve>} {<--listen-port>} {($ Id.VSub_DollarName '$SVNSERVE_PORT')} {<--root>} {(DQ ($ Id.VSub_DollarName '$rawsvnrepo'))} {<--listen-once>} {<--listen-host>} {<127.0.0.1>} ) terminator: <Id.Op_Amp _> ) ] ) ) (command.ShFunction name: prepare_a_utf8_locale body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:a_utf8_locale) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<locale>} {<-a>}) (C {<sed>} {<-n>} {(SQ <'/\\.[uU][tT][fF]-*8$/{\n'> <'\tp\n'> <'\tq\n'> <'}'>)} ) ] negated: F ) ) } spids: [540] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [(C {<test>} {<-n>} {(DQ ($ Id.VSub_DollarName '$a_utf8_locale'))})] ) action: [(C {<test_set_prereq>} {<UTF8>})] spids: [561 572] ) ] else_action: [(C {<say>} {(DQ <'# UTF-8 locale not available, some tests are skipped'>)})] ) ] ) ) ] )