{"thread":{"id":"3406","subject":"[PATCH 1/9] git-svn: fix a typo in defining the --no-stop-on-copy option","startedAt":"2006-02-20T18:57:25Z","lastAt":"2006-02-20T18:57:26Z","messageCount":4,"participants":["Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":9},"messages":[{"id":"16460","messageId":"11404618452729-git-send-email-normalperson@yhbt.net","threadId":"3406","inReplyTo":"11404618453236-git-send-email-normalperson@yhbt.net","subject":"[PATCH 1/9] git-svn: fix a typo in defining the --no-stop-on-copy option","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-02-20T18:57:25Z","receivedAt":"2006-02-20T18:57:25Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Just a typo, I doubt anybody would use (and I highly recommend not\nusing) this option anyways.  But you never know...\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n\n---\n\n contrib/git-svn/git-svn |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\n7292b0320d5aab4f335b7c1198b77231bf78d44a\ndiff --git a/contrib/git-svn/git-svn b/contrib/git-svn/git-svn\nindex 71a8b3b..1a8f40e 100755\n--- a/contrib/git-svn/git-svn\n+++ b/contrib/git-svn/git-svn\n@@ -38,7 +38,7 @@ GetOptions(\t'revision|r=s' => \\$_revisio\n \t\t'edit|e' => \\$_edit,\n \t\t'rmdir' => \\$_rmdir,\n \t\t'help|H|h' => \\$_help,\n-\t\t'no-stop-copy' => \\$_no_stop_copy );\n+\t\t'no-stop-on-copy' => \\$_no_stop_copy );\n my %cmd = (\n \tfetch => [ \\&fetch, \"Download new revisions from SVN\" ],\n \tinit => [ \\&init, \"Initialize and fetch (import)\"],\n-- \n1.2.0.gdee6\n"},{"id":"16465","messageId":"11404618453236-git-send-email-normalperson@yhbt.net","threadId":"3406","inReplyTo":null,"subject":"git-svn: nearing 1.0.0","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-02-20T18:57:25Z","receivedAt":"2006-02-20T18:57:25Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"      \nThis should hopefully be the last set of bugfixes I have for git-svn.  I'm\npretty satisfied with it, as I haven't needed to directly invoke svn and wait\nfor it in any of my day-to-day operations for doing work on svn repositories.\n\nMost of the major changes are in 'commit' functionality where several\ncorner-case bugs have been found and fixed.\n\n      git-svn: fix a typo in defining the --no-stop-on-copy option\n      git-svn: allow --find-copies-harder and -l<num> to be passed on commit\n      git-svn: Allow for more argument types for commit (from..to)\n      git-svn: remove any need for the XML::Simple dependency\n      git-svn: change ; to && in addremove()\n      contrib/git-svn.txt: add a note about renamed/copied directory support\n      git-svn: fix several corner-case and rare bugs with 'commit'\n      contrib/git-svn: add Makefile, test, and associated ignores\n      git-svn: 0.9.1: add --version and copyright/license (GPL v2+) information\n\n .gitignore                 |    4 \n Makefile                   |   32 +++\n git-svn.perl               |  382 +++++++++++++++++++++++++++++++--------------\n git-svn.txt                |   16 +\n t/t0000-contrib-git-svn.sh |  216 +++++++++++++++++++++++++\n 5 files changed, 532 insertions(+), 118 deletions(-)\n\n-- \nEric Wong\n"},{"id":"16464","messageId":"11404618464102-git-send-email-normalperson@yhbt.net","threadId":"3406","inReplyTo":"11404618452729-git-send-email-normalperson@yhbt.net","subject":"[PATCH 2/9] git-svn: allow --find-copies-harder and -l<num> to be passed on commit","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-02-20T18:57:26Z","receivedAt":"2006-02-20T18:57:26Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Both of these options are passed directly to git-diff-tree when\ncommitting to a SVN repository.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n\n---\n\n contrib/git-svn/git-svn     |   10 ++++++++--\n contrib/git-svn/git-svn.txt |    7 +++++++\n 2 files changed, 15 insertions(+), 2 deletions(-)\n\nf00770e6f3151e5fdc94208efab22b3068dbb882\ndiff --git a/contrib/git-svn/git-svn b/contrib/git-svn/git-svn\nindex 1a8f40e..477ec16 100755\n--- a/contrib/git-svn/git-svn\n+++ b/contrib/git-svn/git-svn\n@@ -30,7 +30,8 @@ use Getopt::Long qw/:config gnu_getopt n\n use File::Spec qw//;\n my $sha1 = qr/[a-f\\d]{40}/;\n my $sha1_short = qr/[a-f\\d]{6,40}/;\n-my ($_revision,$_stdin,$_no_ignore_ext,$_no_stop_copy,$_help,$_rmdir,$_edit);\n+my ($_revision,$_stdin,$_no_ignore_ext,$_no_stop_copy,$_help,$_rmdir,$_edit,\n+\t$_find_copies_harder, $_l);\n \n GetOptions(\t'revision|r=s' => \\$_revision,\n \t\t'no-ignore-externals' => \\$_no_ignore_ext,\n@@ -38,6 +39,8 @@ GetOptions(\t'revision|r=s' => \\$_revisio\n \t\t'edit|e' => \\$_edit,\n \t\t'rmdir' => \\$_rmdir,\n \t\t'help|H|h' => \\$_help,\n+\t\t'find-copies-harder' => \\$_find_copies_harder,\n+\t\t'l=i' => \\$_l,\n \t\t'no-stop-on-copy' => \\$_no_stop_copy );\n my %cmd = (\n \tfetch => [ \\&fetch, \"Download new revisions from SVN\" ],\n@@ -348,7 +351,10 @@ sub svn_checkout_tree {\n \tmy $pid = open my $diff_fh, '-|';\n \tdefined $pid or croak $!;\n \tif ($pid == 0) {\n-\t\texec(qw(git-diff-tree -z -r -C), $from, $commit) or croak $!;\n+\t\tmy @diff_tree = qw(git-diff-tree -z -r -C);\n+\t\tpush @diff_tree, '--find-copies-harder' if $_find_copies_harder;\n+\t\tpush @diff_tree, \"-l$_l\" if defined $_l;\n+\t\texec(@diff_tree, $from, $commit) or croak $!;\n \t}\n \tmy $mods = parse_diff_tree($diff_fh);\n \tunless (@$mods) {\ndiff --git a/contrib/git-svn/git-svn.txt b/contrib/git-svn/git-svn.txt\nindex 4b79fb0..9912f5a 100644\n--- a/contrib/git-svn/git-svn.txt\n+++ b/contrib/git-svn/git-svn.txt\n@@ -99,6 +99,13 @@ OPTIONS\n \tdefault for objects that are commits, and forced on when committing\n \ttree objects.\n \n+-l<num>::\n+--find-copies-harder::\n+\tBoth of these are only used with the 'commit' command.\n+\n+\tThey are both passed directly to git-diff-tree see\n+\tgit-diff-tree(1) for more information.\n+\n COMPATIBILITY OPTIONS\n ---------------------\n --no-ignore-externals::\n-- \n1.2.0.gdee6\n"},{"id":"16466","messageId":"1140461846433-git-send-email-normalperson@yhbt.net","threadId":"3406","inReplyTo":"11404618464102-git-send-email-normalperson@yhbt.net","subject":"[PATCH 3/9] git-svn: Allow for more argument types for commit (from..to)","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-02-20T18:57:26Z","receivedAt":"2006-02-20T18:57:26Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Allow 'from..to' notation from the command line.\n\nMore liberal sha1 parsing when reading from stdin no longer requires the\nsha1 to be the first character, so a leading 'commit ' string is OK.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n\n---\n\n contrib/git-svn/git-svn     |   13 ++++++++++---\n contrib/git-svn/git-svn.txt |    2 +-\n 2 files changed, 11 insertions(+), 4 deletions(-)\n\n4d8326c4868461e8a48a4e25ef11ece6e9f92843\ndiff --git a/contrib/git-svn/git-svn b/contrib/git-svn/git-svn\nindex 477ec16..5f23d6b 100755\n--- a/contrib/git-svn/git-svn\n+++ b/contrib/git-svn/git-svn\n@@ -216,14 +216,21 @@ sub commit {\n \t\tprint \"Reading from stdin...\\n\";\n \t\t@commits = ();\n \t\twhile (<STDIN>) {\n-\t\t\tif (/^([a-f\\d]{6,40})\\b/) {\n+\t\t\tif (/\\b([a-f\\d]{6,40})\\b/) {\n \t\t\t\tunshift @commits, $1;\n \t\t\t}\n \t\t}\n \t}\n \tmy @revs;\n-\tforeach (@commits) {\n-\t\tpush @revs, (safe_qx('git-rev-parse',$_));\n+\tforeach my $c (@commits) {\n+\t\tchomp(my @tmp = safe_qx('git-rev-parse',$c));\n+\t\tif (scalar @tmp == 1) {\n+\t\t\tpush @revs, $tmp[0];\n+\t\t} elsif (scalar @tmp > 1) {\n+\t\t\tpush @revs, reverse (safe_qx('git-rev-list',@tmp));\n+\t\t} else {\n+\t\t\tdie \"Failed to rev-parse $c\\n\";\n+\t\t}\n \t}\n \tchomp @revs;\n \ndiff --git a/contrib/git-svn/git-svn.txt b/contrib/git-svn/git-svn.txt\nindex 9912f5a..07a236f 100644\n--- a/contrib/git-svn/git-svn.txt\n+++ b/contrib/git-svn/git-svn.txt\n@@ -149,7 +149,7 @@ Tracking and contributing to an Subversi\n # Commit only the git commits you want to SVN::\n \tgit-svn commit <tree-ish> [<tree-ish_2> ...]\n # Commit all the git commits from my-branch that don't exist in SVN::\n-\tgit rev-list --pretty=oneline git-svn-HEAD..my-branch | git-svn commit\n+\tgit commit git-svn-HEAD..my-branch\n # Something is committed to SVN, pull the latest into your branch::\n \tgit-svn fetch && git pull . git-svn-HEAD\n \n-- \n1.2.0.gdee6\n"}]}