(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description) op: assign_op.Equal rhs: {(SQ <'git svn propset tests'>)} spids: [13] ) ] redirects: [] ) (C {<.>} {<'./lib-git-svn.sh'>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'foo_subdir2='> name:foo_subdir2) op: assign_op.Equal rhs: {(DQ <'subdir/subdir2/foo_subdir2'>)} spids: [24] ) ] redirects: [] ) (C {<set>} {<-e>}) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<mkdir>} {<Id.KW_Import import>}) (command.Subshell child: (command.CommandList children: [ (command.Sentence child:(C {<set>} {<-e>}) terminator:<Id.Op_Semi _>) (C {<cd>} {<Id.KW_Import import>}) (C {<mkdir>} {<subdir>}) (C {<mkdir>} {<'subdir/subdir2'>}) (C {<touch>} {<foo>}) (C {<touch>} {<'subdir/foo_subdir'>}) (C {<touch>} {(DQ ($ Id.VSub_DollarName foo_subdir2))}) (command.Simple words: [ {<svn_cmd>} {<Id.KW_Import import>} {<-m>} {(SQ <'import for git svn'>)} {<.>} {(DQ ($ Id.VSub_DollarName svnrepo))} ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] more_env: [] do_fork: T ) ] ) redirects: [] ) ] ) (C {<rm>} {<-rf>} {<Id.KW_Import import>}) (C {<test_expect_success>} {(SQ <'initialize git svn'>)} {(SQ <'\n'> <'\tgit svn init "$svnrepo"\n'> <'\t'>)} ) (C {<test_expect_success>} {(SQ <'fetch revisions from svn'>)} {(SQ <'\n'> <'\tgit svn fetch\n'> <'\t'>)} ) (command.ShFunction name: set_props body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'subdir='> name:subdir) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number 1))} spids: [150] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'file='> name:file) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number 2))} spids: [156] ) ] redirects: [] ) (command.Sentence child:(C {<shift>}) terminator:<Id.Op_Semi _>) (command.Sentence child:(C {<shift>}) terminator:<Id.Op_Semi _>) (command.Subshell child: (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (C {<cd>} {(DQ ($ Id.VSub_DollarName subdir))}) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-gt>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<git>} {<svn>} {<propset>} {(DQ ($ Id.VSub_Number 1))} {(DQ ($ Id.VSub_Number 2))} {(DQ ($ Id.VSub_DollarName file))} ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] ) (command.Sentence child: (C {<shift>}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<shift>}) terminator: <Id.Op_Semi _> ) ] ) redirects: [] ) (command.Simple words: [{<echo>} {<hello>}] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_DollarName file))} ) ] more_env: [] do_fork: T ) (C {<git>} {<commit>} {<-m>} {(DQ <'testing propset'>)} {(DQ ($ Id.VSub_DollarName file))} ) ] ) redirects: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name: confirm_props body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'subdir='> name:subdir) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number 1))} spids: [270] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'file='> name:file) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number 2))} spids: [276] ) ] redirects: [] ) (command.Sentence child:(C {<shift>}) terminator:<Id.Op_Semi _>) (command.Sentence child:(C {<shift>}) terminator:<Id.Op_Semi _>) (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<set>} {<-e>}) terminator: <Id.Op_Semi _> ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<cd>} {(DQ <'svn_project/'> ($ Id.VSub_DollarName subdir))}) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-gt>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<test>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<svn_cmd>} {<propget>} {(DQ ($ Id.VSub_Number 1))} {(DQ ($ Id.VSub_DollarName file))} ) right: <Id.Eof_RParen _> ) ) } {<Id.Lit_Equals '='>} {(DQ ($ Id.VSub_Number 2))} ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] ) (command.Sentence child: (C {<shift>}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<shift>}) terminator: <Id.Op_Semi _> ) ] ) redirects: [] ) ] ) ] ) redirects: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (C {<test_expect_success>} {(SQ <'add props top level'>)} { (SQ <'\n'> <'\tset_props "." "foo" "svn:keywords" "FreeBSD=%H" &&\n'> <'\tgit svn dcommit &&\n'> <'\tsvn_cmd co "$svnrepo" svn_project &&\n'> <'\tconfirm_props "." "foo" "svn:keywords" "FreeBSD=%H" &&\n'> <'\trm -rf svn_project\n'> <'\t'> ) } ) (C {<test_expect_success>} {(SQ <'add multiple props'>)} { (SQ <'\n'> <'\tset_props "." "foo" \\\n'> <'\t\t"svn:keywords" "FreeBSD=%H" fbsd:nokeywords yes &&\n'> <'\tgit svn dcommit &&\n'> <'\tsvn_cmd co "$svnrepo" svn_project &&\n'> <'\tconfirm_props "." "foo" \\\n'> <'\t\t"svn:keywords" "FreeBSD=%H" fbsd:nokeywords yes &&\n'> <'\trm -rf svn_project\n'> <'\t'> ) } ) (C {<test_expect_success>} {(SQ <'add props subdir'>)} { (SQ <'\n'> <'\tset_props "." "$foo_subdir2" svn:keywords "FreeBSD=%H" &&\n'> <'\tgit svn dcommit &&\n'> <'\tsvn_cmd co "$svnrepo" svn_project &&\n'> <'\tconfirm_props "." "$foo_subdir2" "svn:keywords" "FreeBSD=%H" &&\n'> <'\trm -rf svn_project\n'> <'\t'> ) } ) (C {<test_expect_success>} {(SQ <'add props relative'>)} { (SQ <'\n'> <'\tset_props "subdir/subdir2" "../foo_subdir" \\\n'> <'\t\tsvn:keywords "FreeBSD=%H" &&\n'> <'\tgit svn dcommit &&\n'> <'\tsvn_cmd co "$svnrepo" svn_project &&\n'> <'\tconfirm_props "subdir/subdir2" "../foo_subdir" \\\n'> <'\t\tsvn:keywords "FreeBSD=%H" &&\n'> <'\trm -rf svn_project\n'> <'\t'> ) } ) (C {<test_done>}) ] )