(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description) op: Equal rhs: {(SQ <'git svn property tests'>)} ) ] ) (C {(.)} {(./lib-git-svn.sh)}) (C {(mkdir)} {(import)}) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:a_crlf) op:Equal rhs:(word.EmptyWord))] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:a_lf) op:Equal rhs:(word.EmptyWord))] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:a_cr) op:Equal rhs:(word.EmptyWord))] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:a_ne_crlf) op:Equal rhs:(word.EmptyWord))] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:a_ne_lf) op:Equal rhs:(word.EmptyWord))] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:a_ne_cr) op:Equal rhs:(word.EmptyWord))] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:a_empty) op:Equal rhs:(word.EmptyWord))] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:a_empty_lf) op:Equal rhs:(word.EmptyWord))] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:a_empty_cr) op:Equal rhs:(word.EmptyWord))] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:a_empty_crlf) op:Equal rhs:(word.EmptyWord))] ) (C {(cd)} {(import)}) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(kw.c)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 66 stdin_parts: [('/* Somebody prematurely put a keyword into this file */\n') ('/* $Id$ */\n')] ) ] ) (command.SimpleCommand words: [ {(printf)} { (DQ (Hello) (Lit_Other '\\') (r) (Lit_Other '\\') (nWorld) (Lit_Other '\\') (r) (Lit_Other '\\') (n) ) } ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(crlf)})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:a_crlf) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(hash-object)} {(-w)} {(crlf)})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.SimpleCommand words: [{(printf)} {(DQ (Hello) (Lit_Other '\\') (rWorld) (Lit_Other '\\') (r))}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(cr)})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:a_cr) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(hash-object)} {(-w)} {(cr)})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.SimpleCommand words: [{(printf)} {(DQ (Hello) (Lit_Other '\\') (nWorld) (Lit_Other '\\') (n))}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(lf)})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:a_lf) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(hash-object)} {(-w)} {(lf)})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.SimpleCommand words: [{(printf)} {(DQ (Hello) (Lit_Other '\\') (r) (Lit_Other '\\') (nWorld))}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(ne_crlf)})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:a_ne_crlf) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(hash-object)} {(-w)} {(ne_crlf)})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.SimpleCommand words: [{(printf)} {(DQ (Hello) (Lit_Other '\\') (nWorld))}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(ne_lf)})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:a_ne_lf) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(hash-object)} {(-w)} {(ne_lf)})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.SimpleCommand words: [{(printf)} {(DQ (Hello) (Lit_Other '\\') (rWorld))}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(ne_cr)})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:a_ne_cr) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(hash-object)} {(-w)} {(ne_cr)})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (C {(touch)} {(empty)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:a_empty) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(hash-object)} {(-w)} {(empty)})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.SimpleCommand words: [{(printf)} {(DQ (Lit_Other '\\') (n))}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(empty_lf)})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:a_empty_lf) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(hash-object)} {(-w)} {(empty_lf)})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.SimpleCommand words: [{(printf)} {(DQ (Lit_Other '\\') (r))}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(empty_cr)})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:a_empty_cr) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(hash-object)} {(-w)} {(empty_cr)})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.SimpleCommand words: [{(printf)} {(DQ (Lit_Other '\\') (r) (Lit_Other '\\') (n))}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(empty_crlf)})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:a_empty_crlf) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(hash-object)} {(-w)} {(empty_crlf)})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.SimpleCommand words: [ {(svn_cmd)} {(import)} {(--no-auto-props)} {(-m)} {(SQ <'import for git svn'>)} {(.)} {(DQ ($ VSub_DollarName '$svnrepo'))} ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})] ) (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'>)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:name) op: Equal rhs: {(SQ <'test svn:keywords ignoring'>)} ) ] ) (C {(test_expect_success)} {(DQ ($ VSub_DollarName '$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'> ) } ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:expect) op:Equal rhs:{(SQ <'/* $Id$ */'>)})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:got) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(sed)} {(-ne)} {(2p)} {(kw.c)})]) left_token: <Left_CommandSub '$('> ) ) } ) ] ) (C {(test_expect_success)} {(SQ <'raw $Id$ found in kw.c'>)} {(DQ ("test '") ($ VSub_DollarName '$expect') ("' = '") ($ VSub_DollarName '$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'> ) } ) (command.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: F body: (command.DoGroup children: [ (C {(test_expect_success)} {(DQ ('Comparing ') ($ VSub_DollarName '$i'))} {(DQ ('cmp ') ($ VSub_DollarName '$i') (' new_wc/') ($ VSub_DollarName '$i'))} ) ] ) ) (C {(cd)} {(test_wc)}) (command.SimpleCommand words: [{(printf)} {(SQ <'$Id$\\rHello\\rWorld\\r'>)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(cr)})] ) (command.SimpleCommand words: [{(printf)} {(SQ <'$Id$\\rHello\\rWorld'>)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(ne_cr)})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:a_cr) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(printf)} {(SQ <'$Id$\\r\\nHello\\r\\nWorld\\r\\n'>)}) (C {(git)} {(hash-object)} {(--stdin)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:a_ne_cr) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(printf)} {(SQ <'$Id$\\r\\nHello\\r\\nWorld'>)}) (C {(git)} {(hash-object)} {(--stdin)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (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'>)} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:b_cr) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(git)} {(hash-object)} {(cr)})]) left_token: <Left_CommandSub '$('> ) ) } ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:b_ne_cr) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(hash-object)} {(ne_cr)})] ) left_token: <Left_CommandSub '$('> ) ) } ) ] ) (C {(test_expect_success)} {(SQ <'CRLF + $Id$'>)} {(DQ ("test '") ($ VSub_DollarName '$a_cr') ("' = '") ($ VSub_DollarName '$b_cr') ("'"))} ) (C {(test_expect_success)} {(SQ <'CRLF + $Id$ (no newline)'>)} {(DQ ("test '") ($ VSub_DollarName '$a_ne_cr') ("' = '") ($ VSub_DollarName '$b_ne_cr') ("'"))} ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(show-ignore.expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 716 stdin_parts: [ ('\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') ] ) ] ) (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') ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(create-ignore.expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 752 stdin_parts: [('/no-such-file*\n')] ) ] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(create-ignore-index.expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 767 stdin_parts: [ ('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' ) ] ) ] ) (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') ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(prop.expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 800 stdin_parts: [('\n') ('no-such-file*\n') ('\n')] ) ] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(prop2.expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 811 stdin_parts: [('8\n')] ) ] ) (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') ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(prop.expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 859 stdin_parts: [ ("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') ] ) ] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(prop2.expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)} here_end_span_id: 874 stdin_parts: [ ("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') ] ) ] ) (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)}) ] )