(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"git svn property tests">)} spids: [13] ) ] spids: [13] ) (C {(.)} {(./lib-git-svn.sh)}) (C {(mkdir)} {(import)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:a_crlf) op:Equal rhs:{(SQ )} spids:[28])] spids: [28] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:a_lf) op:Equal rhs:{(SQ )} spids:[30])] spids: [30] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:a_cr) op:Equal rhs:{(SQ )} spids:[32])] spids: [32] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:a_ne_crlf) op:Equal rhs:{(SQ )} spids:[34])] spids: [34] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:a_ne_lf) op:Equal rhs:{(SQ )} spids:[36])] spids: [36] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:a_ne_cr) op:Equal rhs:{(SQ )} spids:[38])] spids: [38] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:a_empty) op:Equal rhs:{(SQ )} spids:[40])] spids: [40] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:a_empty_lf) op:Equal rhs:{(SQ )} spids:[42])] spids: [42] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:a_empty_cr) op:Equal rhs:{(SQ )} spids:[44])] spids: [44] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:a_empty_crlf) op:Equal rhs:{(SQ )} spids:[46])] spids: [46] ) (C {(cd)} {(import)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_DGreat fd:-1 arg_word:{(kw.c)} spids:[56]) (HereDoc op_id: Redir_DLess fd: -1 body: {("/* Somebody prematurely put a keyword into this file */\n") ("/* $Id$ */\n")} do_expansion: False here_end: EOF was_filled: True spids: [60] ) ] ) (SimpleCommand words: [ {(printf)} { (DQ (Hello) (EscapedLiteralPart token:<Lit_EscapedChar "\\r">) (EscapedLiteralPart token:<Lit_EscapedChar "\\n">) (World) (EscapedLiteralPart token:<Lit_EscapedChar "\\r">) (EscapedLiteralPart token:<Lit_EscapedChar "\\n">) ) } ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(crlf)} spids:[77])] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:a_crlf) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(git)} {(hash-object)} {(-w)} {(crlf)})]) left_token: <Left_CommandSub "$("> spids: [83 91] ) } spids: [82] ) ] spids: [82] ) (SimpleCommand words: [ {(printf)} { (DQ (Hello) (EscapedLiteralPart token:<Lit_EscapedChar "\\r">) (World) (EscapedLiteralPart token:<Lit_EscapedChar "\\r">) ) } ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(cr)} spids:[103])] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:a_cr) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(git)} {(hash-object)} {(-w)} {(cr)})]) left_token: <Left_CommandSub "$("> spids: [109 117] ) } spids: [108] ) ] spids: [108] ) (SimpleCommand words: [ {(printf)} { (DQ (Hello) (EscapedLiteralPart token:<Lit_EscapedChar "\\n">) (World) (EscapedLiteralPart token:<Lit_EscapedChar "\\n">) ) } ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(lf)} spids:[129])] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:a_lf) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(git)} {(hash-object)} {(-w)} {(lf)})]) left_token: <Left_CommandSub "$("> spids: [135 143] ) } spids: [134] ) ] spids: [134] ) (SimpleCommand words: [ {(printf)} { (DQ (Hello) (EscapedLiteralPart token:<Lit_EscapedChar "\\r">) (EscapedLiteralPart token:<Lit_EscapedChar "\\n">) (World) ) } ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(ne_crlf)} spids:[156])] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:a_ne_crlf) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(git)} {(hash-object)} {(-w)} {(ne_crlf)})]) left_token: <Left_CommandSub "$("> spids: [162 170] ) } spids: [161] ) ] spids: [161] ) (SimpleCommand words: [{(printf)} {(DQ (Hello) (EscapedLiteralPart token:<Lit_EscapedChar "\\n">) (World))}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(ne_lf)} spids:[181])] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:a_ne_lf) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(git)} {(hash-object)} {(-w)} {(ne_lf)})]) left_token: <Left_CommandSub "$("> spids: [187 195] ) } spids: [186] ) ] spids: [186] ) (SimpleCommand words: [{(printf)} {(DQ (Hello) (EscapedLiteralPart token:<Lit_EscapedChar "\\r">) (World))}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(ne_cr)} spids:[206])] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:a_ne_cr) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(git)} {(hash-object)} {(-w)} {(ne_cr)})]) left_token: <Left_CommandSub "$("> spids: [212 220] ) } spids: [211] ) ] spids: [211] ) (C {(touch)} {(empty)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:a_empty) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(git)} {(hash-object)} {(-w)} {(empty)})]) left_token: <Left_CommandSub "$("> spids: [230 238] ) } spids: [229] ) ] spids: [229] ) (SimpleCommand words: [{(printf)} {(DQ (EscapedLiteralPart token:<Lit_EscapedChar "\\n">))}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(empty_lf)} spids:[247])] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:a_empty_lf) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(git)} {(hash-object)} {(-w)} {(empty_lf)})] ) left_token: <Left_CommandSub "$("> spids: [253 261] ) } spids: [252] ) ] spids: [252] ) (SimpleCommand words: [{(printf)} {(DQ (EscapedLiteralPart token:<Lit_EscapedChar "\\r">))}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(empty_cr)} spids:[270])] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:a_empty_cr) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(git)} {(hash-object)} {(-w)} {(empty_cr)})] ) left_token: <Left_CommandSub "$("> spids: [276 284] ) } spids: [275] ) ] spids: [275] ) (SimpleCommand words: [ {(printf)} { (DQ (EscapedLiteralPart token:<Lit_EscapedChar "\\r">) (EscapedLiteralPart token:<Lit_EscapedChar "\\n">) ) } ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(empty_crlf)} spids:[294])] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:a_empty_crlf) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(git)} {(hash-object)} {(-w)} {(empty_crlf)})] ) left_token: <Left_CommandSub "$("> spids: [300 308] ) } spids: [299] ) ] spids: [299] ) (SimpleCommand words: [ {(svn_cmd)} {(import)} {(--no-auto-props)} {(-m)} {(SQ <"import for git svn">)} {(.)} {(DQ ($ VSub_Name "$svnrepo"))} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[330])] ) (C {(cd)} {(..)}) (C {(rm)} {(-rf)} {(import)}) (C {(test_expect_success)} {(SQ <"checkout working copy from svn">)} {(SQ <"svn co \"$svnrepo\" test_wc">)} ) (C {(test_expect_success)} {(SQ <"setup some commits to svn">)} { (SQ <"\n"> <"\t(\n"> <"\t\tcd test_wc &&\n"> <"\t\techo Greetings >> kw.c &&\n"> <"\t\tpoke kw.c &&\n"> <"\t\tsvn_cmd commit -m \"Not yet an Id\" &&\n"> <"\t\techo Hello world >> kw.c &&\n"> <"\t\tpoke kw.c &&\n"> <"\t\tsvn_cmd commit -m \"Modified file, but still not yet an Id\" &&\n"> <"\t\tsvn_cmd propset svn:keywords Id kw.c &&\n"> <"\t\tpoke kw.c &&\n"> <"\t\tsvn_cmd commit -m \"Propset Id\"\n"> <"\t)\n"> ) } ) (C {(test_expect_success)} {(SQ <"initialize git svn">)} {(SQ <"git svn init \"$svnrepo\"">)}) (C {(test_expect_success)} {(SQ <"fetch revisions from svn">)} {(SQ <"git svn fetch">)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:name) op: Equal rhs: {(SQ <"test svn:keywords ignoring">)} spids: [398] ) ] spids: [398] ) (C {(test_expect_success)} {(DQ ($ VSub_Name "$name"))} { (SQ <"git checkout -b mybranch remotes/git-svn &&\n"> <"\techo Hi again >> kw.c &&\n"> <"\tgit commit -a -m \"test keywords ignoring\" &&\n"> <"\tgit svn set-tree remotes/git-svn..mybranch &&\n"> <"\tgit pull . remotes/git-svn"> ) } ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:expect) op:Equal rhs:{(SQ <"/* $Id$ */">)} spids:[420])] spids: [420] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:got) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(sed)} {(-ne)} {(2p)} {(kw.c)})]) left_token: <Left_CommandSub "$("> spids: [427 435] ) ) } spids: [425] ) ] spids: [425] ) (C {(test_expect_success)} {(SQ <"raw $Id$ found in kw.c">)} {(DQ ("test '") ($ VSub_Name "$expect") ("' = '") ($ VSub_Name "$got") ("'"))} ) (C {(test_expect_success)} {(DQ ("propset CR on crlf files"))} { (SQ <"\n"> <"\t(\n"> <"\t\tcd test_wc &&\n"> <"\t\tsvn_cmd propset svn:eol-style CR empty &&\n"> <"\t\tsvn_cmd propset svn:eol-style CR crlf &&\n"> <"\t\tsvn_cmd propset svn:eol-style CR ne_crlf &&\n"> <"\t\tsvn_cmd commit -m \"propset CR on crlf files\"\n"> <"\t )\n"> ) } ) (C {(test_expect_success)} {(SQ <"fetch and pull latest from svn and checkout a new wc">)} { (SQ <"git svn fetch &&\n"> <"\t git pull . remotes/git-svn &&\n"> <"\t svn_cmd co \"$svnrepo\" new_wc"> ) } ) (ForEach iter_name: i iter_words: [ {(crlf)} {(ne_crlf)} {(lf)} {(ne_lf)} {(cr)} {(ne_cr)} {(empty_cr)} {(empty_lf)} {(empty)} {(empty_crlf)} ] do_arg_iter: False body: (DoGroup children: [ (C {(test_expect_success)} {(DQ ("Comparing ") ($ VSub_Name "$i"))} {(DQ ("cmp ") ($ VSub_Name "$i") (" new_wc/") ($ VSub_Name "$i"))} ) ] spids: [512 529] ) spids: [491 -1] ) (C {(cd)} {(test_wc)}) (SimpleCommand words: [{(printf)} {(SQ <"$Id$\\rHello\\rWorld\\r">)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(cr)} spids:[544])] ) (SimpleCommand words: [{(printf)} {(SQ <"$Id$\\rHello\\rWorld">)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(ne_cr)} spids:[555])] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:a_cr) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(printf)} {(SQ <"$Id$\\r\\nHello\\r\\nWorld\\r\\n">)}) (C {(git)} {(hash-object)} {(--stdin)}) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [561 575] ) } spids: [560] ) ] spids: [560] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:a_ne_cr) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(printf)} {(SQ <"$Id$\\r\\nHello\\r\\nWorld">)}) (C {(git)} {(hash-object)} {(--stdin)}) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [579 593] ) } spids: [578] ) ] spids: [578] ) (C {(test_expect_success)} {(SQ <"Set CRLF on cr files">)} { (SQ <"svn_cmd propset svn:eol-style CRLF cr &&\n"> <"\t svn_cmd propset svn:eol-style CRLF ne_cr &&\n"> <"\t svn_cmd propset svn:keywords Id cr &&\n"> <"\t svn_cmd propset svn:keywords Id ne_cr &&\n"> <"\t svn_cmd commit -m \"propset CRLF on cr files\""> ) } ) (C {(cd)} {(..)}) (C {(test_expect_success)} {(SQ <"fetch and pull latest from svn">)} {(SQ <"git svn fetch && git pull . remotes/git-svn">)} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:b_cr) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(git)} {(hash-object)} {(cr)})]) left_token: <Left_CommandSub "$("> spids: [631 637] ) ) } spids: [629] ) ] spids: [629] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:b_ne_cr) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(git)} {(hash-object)} {(ne_cr)})]) left_token: <Left_CommandSub "$("> spids: [642 648] ) ) } spids: [640] ) ] spids: [640] ) (C {(test_expect_success)} {(SQ <"CRLF + $Id$">)} {(DQ ("test '") ($ VSub_Name "$a_cr") ("' = '") ($ VSub_Name "$b_cr") ("'"))} ) (C {(test_expect_success)} {(SQ <"CRLF + $Id$ (no newline)">)} {(DQ ("test '") ($ VSub_Name "$a_ne_cr") ("' = '") ($ VSub_Name "$b_ne_cr") ("'"))} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(show-ignore.expect)} spids:[683]) (HereDoc op_id: Redir_DLess fd: -1 body: {("\n") ("# /\n") ("/no-such-file*\n") ("\n") ("# /deeply/\n") ("/deeply/no-such-file*\n") ("\n") ("# /deeply/nested/\n") ("/deeply/nested/no-such-file*\n") ("\n") ("# /deeply/nested/directory/\n") ("/deeply/nested/directory/no-such-file*\n") } do_expansion: False here_end: EOF was_filled: True spids: [687] ) ] ) (C {(test_expect_success)} {(SQ <"test show-ignore">)} { (DQ ("\n") ("\t(\n") ("\t\tcd test_wc &&\n") ("\t\tmkdir -p deeply/nested/directory &&\n") ("\t\ttouch deeply/nested/directory/.keep &&\n") ("\t\tsvn_cmd add deeply &&\n") ("\t\tsvn_cmd up &&\n") ("\t\tsvn_cmd propset -R svn:ignore '\n") ("no-such-file*\n") ("' .\n") ("\t\tsvn_cmd commit -m 'propset svn:ignore'\n") ("\t) &&\n") ("\tgit svn show-ignore > show-ignore.got &&\n") ("\tcmp show-ignore.expect show-ignore.got\n") ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(create-ignore.expect)} spids:[718]) (HereDoc op_id: Redir_DLess fd: -1 body: {("/no-such-file*\n")} do_expansion: False here_end: EOF was_filled: True spids: [721] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(create-ignore-index.expect)} spids:[728]) (HereDoc op_id: Redir_DLess fd: -1 body: {("100644 8c52e5dfcd0a8b6b6bcfe6b41b89bcbf493718a5 0\t.gitignore\n") ("100644 8c52e5dfcd0a8b6b6bcfe6b41b89bcbf493718a5 0\tdeeply/.gitignore\n") ("100644 8c52e5dfcd0a8b6b6bcfe6b41b89bcbf493718a5 0\tdeeply/nested/.gitignore\n") ( "100644 8c52e5dfcd0a8b6b6bcfe6b41b89bcbf493718a5 0\tdeeply/nested/directory/.gitignore\n" ) } do_expansion: False here_end: EOF was_filled: True spids: [731] ) ] ) (C {(test_expect_success)} {(SQ <"test create-ignore">)} { (DQ ("\n") ("\tgit svn fetch && git pull . remotes/git-svn &&\n") ("\tgit svn create-ignore &&\n") ("\tcmp ./.gitignore create-ignore.expect &&\n") ("\tcmp ./deeply/.gitignore create-ignore.expect &&\n") ("\tcmp ./deeply/nested/.gitignore create-ignore.expect &&\n") ("\tcmp ./deeply/nested/directory/.gitignore create-ignore.expect &&\n") ("\tgit ls-files -s | grep gitignore | cmp - create-ignore-index.expect\n") ("\t") ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(prop.expect)} spids:[757]) (HereDoc op_id: Redir_DLess fd: -1 body: {("\n") ("no-such-file*\n") ("\n")} do_expansion: False here_end: EOF was_filled: True spids: [760] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(prop2.expect)} spids:[766]) (HereDoc op_id: Redir_DLess fd: -1 body: {("8\n")} do_expansion: False here_end: EOF was_filled: True spids: [769] ) ] ) (C {(test_expect_success)} {(SQ <"test propget">)} { (DQ ("\n") ("\tgit svn propget svn:ignore . | cmp - prop.expect &&\n") ("\tcd deeply &&\n") ("\tgit svn propget svn:ignore . | cmp - ../prop.expect &&\n") ("\tgit svn propget svn:entry:committed-rev nested/directory/.keep ") ("\t | cmp - ../prop2.expect &&\n") ("\tgit svn propget svn:ignore .. | cmp - ../prop.expect &&\n") ("\tgit svn propget svn:ignore nested/ | cmp - ../prop.expect &&\n") ("\tgit svn propget svn:ignore ./nested | cmp - ../prop.expect &&\n") ("\tgit svn propget svn:ignore .././deeply/nested | cmp - ../prop.expect\n") ("\t") ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(prop.expect)} spids:[807]) (HereDoc op_id: Redir_DLess fd: -1 body: {("Properties on '.':\n") (" svn:entry:committed-date\n") (" svn:entry:committed-rev\n") (" svn:entry:last-author\n") (" svn:entry:uuid\n") (" svn:ignore\n") } do_expansion: False here_end: EOF was_filled: True spids: [810] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(prop2.expect)} spids:[816]) (HereDoc op_id: Redir_DLess fd: -1 body: {("Properties on 'nested/directory/.keep':\n") (" svn:entry:committed-date\n") (" svn:entry:committed-rev\n") (" svn:entry:last-author\n") (" svn:entry:uuid\n") } do_expansion: False here_end: EOF was_filled: True spids: [819] ) ] ) (C {(test_expect_success)} {(SQ <"test proplist">)} { (DQ ("\n") ("\tgit svn proplist . | cmp - prop.expect &&\n") ("\tgit svn proplist nested/directory/.keep | cmp - prop2.expect\n") ("\t") ) } ) (C {(test_done)}) ] )