(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"git svn propset tests">)} spids: [13] ) ] spids: [13] ) (C {(.)} {(./lib-git-svn.sh)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:foo_subdir2) op: Equal rhs: {(DQ (subdir/subdir2/foo_subdir2))} spids: [24] ) ] spids: [24] ) (C {(set)} {(-e)}) (AndOr children: [ (C {(mkdir)} {(import)}) (Subshell child: (CommandList children: [ (Sentence child:(C {(set)} {(-e)}) terminator:<Op_Semi ";">) (C {(cd)} {(import)}) (C {(mkdir)} {(subdir)}) (C {(mkdir)} {(subdir/subdir2)}) (C {(touch)} {(foo)}) (C {(touch)} {(subdir/foo_subdir)}) (C {(touch)} {(DQ ($ VSub_Name "$foo_subdir2"))}) (SimpleCommand words: [ {(svn_cmd)} {(import)} {(-m)} {(SQ <"import for git svn">)} {(.)} {(DQ ($ VSub_Name "$svnrepo"))} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[104])] ) ] ) spids: [40 107] ) ] op_id: Op_DAmp ) (C {(rm)} {(-rf)} {(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">)} ) (FuncDef name: set_props body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subdir) op: Equal rhs: {(DQ ($ VSub_Number "$1"))} spids: [150] ) ] spids: [150] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:file) op: Equal rhs: {(DQ ($ VSub_Number "$2"))} spids: [156] ) ] spids: [156] ) (Sentence child:(C {(shift)}) terminator:<Op_Semi ";">) (Sentence child:(C {(shift)}) terminator:<Op_Semi ";">) (Subshell child: (AndOr children: [ (C {(cd)} {(DQ ($ VSub_Name "$subdir"))}) (AndOr children: [ (While cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-gt)} {(0)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] body: (DoGroup children: [ (AndOr children: [ (C {(git)} {(svn)} {(propset)} {(DQ ($ VSub_Number "$1"))} {(DQ ($ VSub_Number "$2"))} {(DQ ($ VSub_Name "$file"))} ) (C {(exit)} {(1)}) ] op_id: Op_DPipe ) (Sentence child: (C {(shift)}) terminator: <Op_Semi ";"> ) (Sentence child: (C {(shift)}) terminator: <Op_Semi ";"> ) ] spids: [192 226] ) ) (AndOr children: [ (SimpleCommand words: [{(echo)} {(hello)}] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {(DQ ($ VSub_Name "$file"))} spids: [235] ) ] ) (C {(git)} {(commit)} {(-m)} {(DQ ("testing propset"))} {(DQ ($ VSub_Name "$file"))} ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) spids: [168 257] ) ] spids: [147] ) spids: [142 146] ) (FuncDef name: confirm_props body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subdir) op: Equal rhs: {(DQ ($ VSub_Number "$1"))} spids: [270] ) ] spids: [270] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:file) op: Equal rhs: {(DQ ($ VSub_Number "$2"))} spids: [276] ) ] spids: [276] ) (Sentence child:(C {(shift)}) terminator:<Op_Semi ";">) (Sentence child:(C {(shift)}) terminator:<Op_Semi ";">) (Subshell child: (CommandList children: [ (Sentence child:(C {(set)} {(-e)}) terminator:<Op_Semi ";">) (AndOr children: [ (C {(cd)} {(DQ (svn_project/) ($ VSub_Name "$subdir"))}) (While cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-gt)} {(0)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] body: (DoGroup children: [ (AndOr children: [ (C {(test)} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(svn_cmd)} {(propget)} {(DQ ($ VSub_Number "$1"))} {(DQ ($ VSub_Name "$file"))} ) ] ) left_token: <Left_CommandSub "$("> spids: [325 337] ) ) } {(Lit_Other "=")} {(DQ ($ VSub_Number "$2"))} ) (C {(exit)} {(1)}) ] op_id: Op_DPipe ) (Sentence child: (C {(shift)}) terminator: <Op_Semi ";"> ) (Sentence child: (C {(shift)}) terminator: <Op_Semi ";"> ) ] spids: [319 359] ) ) ] op_id: Op_DAmp ) ] ) spids: [288 360] ) ] spids: [267] ) spids: [262 266] ) (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)}) ] )