{"thread":{"id":"43424","subject":"[PATCH 2/2] git-svn: don't die on rebuild when --upgrade is specified","startedAt":"2006-11-05T05:51:10Z","lastAt":"2006-11-05T05:51:11Z","messageCount":2,"participants":["Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"295024","messageId":"11627058712379-git-send-email-normalperson@yhbt.net","threadId":"43424","inReplyTo":null,"subject":"[PATCH 1/2] git-svn: avoid printing filenames of files we're not tracking","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-11-05T05:51:10Z","receivedAt":"2006-11-05T05:51:10Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"This is purely an aesthetic change, we already skip importing of\nfiles that don't affect the subdirectory we import.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n git-svn.perl |    9 ++++-----\n 1 files changed, 4 insertions(+), 5 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 37ecc51..cc3335a 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -2662,11 +2662,12 @@ sub libsvn_connect {\n }\n \n sub libsvn_get_file {\n-\tmy ($gui, $f, $rev) = @_;\n+\tmy ($gui, $f, $rev, $chg) = @_;\n \tmy $p = $f;\n \tif (length $SVN_PATH > 0) {\n \t\treturn unless ($p =~ s#^\\Q$SVN_PATH\\E/##);\n \t}\n+\tprint \"\\t$chg\\t$f\\n\" unless $_q;\n \n \tmy ($hash, $pid, $in, $out);\n \tmy $pool = SVN::Pool->new;\n@@ -2769,8 +2770,7 @@ sub libsvn_fetch {\n \t\t$pool->clear;\n \t}\n \tforeach (@amr) {\n-\t\tprint \"\\t$_->[0]\\t$_->[1]\\n\" unless $_q;\n-\t\tlibsvn_get_file($gui, $_->[1], $rev)\n+\t\tlibsvn_get_file($gui, $_->[1], $rev, $_->[0]);\n \t}\n \tclose $gui or croak $?;\n \treturn libsvn_log_entry($rev, $author, $date, $msg, [$last_commit]);\n@@ -2848,8 +2848,7 @@ sub libsvn_traverse {\n \t\t\tif (defined $files) {\n \t\t\t\tpush @$files, $file;\n \t\t\t} else {\n-\t\t\t\tprint \"\\tA\\t$file\\n\" unless $_q;\n-\t\t\t\tlibsvn_get_file($gui, $file, $rev);\n+\t\t\t\tlibsvn_get_file($gui, $file, $rev, 'A');\n \t\t\t}\n \t\t}\n \t}\n-- \n1.4.3.3.ga126\n"},{"id":"294728","messageId":"11627058733587-git-send-email-normalperson@yhbt.net","threadId":"43424","inReplyTo":"11627058712379-git-send-email-normalperson@yhbt.net","subject":"[PATCH 2/2] git-svn: don't die on rebuild when --upgrade is specified","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-11-05T05:51:11Z","receivedAt":"2006-11-05T05:51:11Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"--copy-remote and --upgrade are rarely (never?) used together,\nso if --copy-remote is specified, that means the user really\nwanted to copy the remote ref, and we should fail if that fails.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n git-svn.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex cc3335a..4a56f18 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -3139,7 +3139,7 @@ sub copy_remote_ref {\n \tmy $ref = \"refs/remotes/$GIT_SVN\";\n \tif (safe_qx('git-ls-remote', $origin, $ref)) {\n \t\tsys(qw/git fetch/, $origin, \"$ref:$ref\");\n-\t} else {\n+\t} elsif ($_cp_remote && !$_upgrade) {\n \t\tdie \"Unable to find remote reference: \",\n \t\t\t\t\"refs/remotes/$GIT_SVN on $origin\\n\";\n \t}\n-- \n1.4.3.3.ga126\n"}]}