{"thread":{"id":"19205","subject":"[PATCH 2/2] git-svn: Correctly report max revision when following deleted paths","startedAt":"2009-05-06T20:18:52Z","lastAt":"2009-05-10T01:32:11Z","messageCount":3,"participants":["Alex Vandiver","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"113121","messageId":"1241641133-6974-1-git-send-email-alexmv@mit.edu","threadId":"19205","inReplyTo":null,"subject":"[PATCH 1/2] git-svn: Fix for svn paths removed > log-window-size revisions ago","fromName":"Alex Vandiver","fromEmail":"alexmv@mit.edu","sentAt":"2009-05-06T20:18:52Z","receivedAt":"2009-05-06T20:18:52Z","isPatch":true,"sender":{"key":"alex@chmrr.net","avatar":"https://avatars.githubusercontent.com/u/28347?v=4"},"body":"Instead of trying to find the end of the commit history only in the\nlast window, track if we have seen commits yet, and use that to judge\nif we need to backtrack and look for a tail.  Otherwise, conversion\ncan silently lose up to 100 revisions of a branch if it was deleted\n>100 revisions ago.\n\nSigned-off-by: Alex Vandiver <alexmv@mit.edu>\n---\n git-svn.perl |    6 +++++-\n 1 files changed, 5 insertions(+), 1 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex ef1d30d..5836dde 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -4438,6 +4438,7 @@ sub gs_fetch_loop_common {\n \tmy ($min, $max) = ($base, $head < $base + $inc ? $head : $base + $inc);\n \tmy $longest_path = longest_common_path($gsv, $globs);\n \tmy $ra_url = $self->{url};\n+\tmy $find_trailing_edge;\n \twhile (1) {\n \t\tmy %revs;\n \t\tmy $err;\n@@ -4455,8 +4456,10 @@ sub gs_fetch_loop_common {\n \t\t               sub { $revs{$_[1]} = _cb(@_) });\n \t\tif ($err) {\n \t\t\tprint \"Checked through r$max\\r\";\n+\t\t} else {\n+\t\t\t$find_trailing_edge = 1;\n \t\t}\n-\t\tif ($err && $max >= $head) {\n+\t\tif ($err and $find_trailing_edge) {\n \t\t\tprint STDERR \"Path '$longest_path' \",\n \t\t\t\t     \"was probably deleted:\\n\",\n \t\t\t\t     $err->expanded_message,\n@@ -4475,6 +4478,7 @@ sub gs_fetch_loop_common {\n \t\t\t\t\tlast;\n \t\t\t\t}\n \t\t\t}\n+\t\t\t$find_trailing_edge = 0;\n \t\t}\n \t\t$SVN::Error::handler = $err_handler;\n \n-- \n1.6.3.rc4.225.g060aa4\n"},{"id":"113120","messageId":"1241641133-6974-2-git-send-email-alexmv@mit.edu","threadId":"19205","inReplyTo":"1241641133-6974-1-git-send-email-alexmv@mit.edu","subject":"[PATCH 2/2] git-svn: Correctly report max revision when following deleted paths","fromName":"Alex Vandiver","fromEmail":"alexmv@mit.edu","sentAt":"2009-05-06T20:18:53Z","receivedAt":"2009-05-06T20:18:53Z","isPatch":true,"sender":{"key":"alex@chmrr.net","avatar":"https://avatars.githubusercontent.com/u/28347?v=4"},"body":"Report the maximum found revision in the range, instead of the minimum\nchanged revision.\n\nSigned-off-by: Alex Vandiver <alexmv@mit.edu>\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 5836dde..eebcf0f 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -4471,7 +4471,7 @@ sub gs_fetch_loop_common {\n \t\t\t\tmy $ok;\n \t\t\t\t$self->get_log([$longest_path], $min, $hi,\n \t\t\t\t               0, 1, 1, sub {\n-\t\t\t\t               $ok ||= $_[1];\n+\t\t\t\t               $ok = $_[1];\n \t\t\t\t               $revs{$_[1]} = _cb(@_) });\n \t\t\t\tif ($ok) {\n \t\t\t\t\tprint STDERR \"r$min .. r$ok OK\\n\";\n-- \n1.6.3.rc4.225.g060aa4\n"},{"id":"113438","messageId":"20090510013211.GB2000@dcvr.yhbt.net","threadId":"19205","inReplyTo":"1241641133-6974-1-git-send-email-alexmv@mit.edu","subject":"Re: [PATCH 1/2] git-svn: Fix for svn paths removed > log-window-size revisions ago","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-05-10T01:32:11Z","receivedAt":"2009-05-10T01:32:11Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Alex Vandiver <alexmv@MIT.EDU> wrote:\n> Instead of trying to find the end of the commit history only in the\n> last window, track if we have seen commits yet, and use that to judge\n> if we need to backtrack and look for a tail.  Otherwise, conversion\n> can silently lose up to 100 revisions of a branch if it was deleted\n> >100 revisions ago.\n> \n> Signed-off-by: Alex Vandiver <alexmv@mit.edu>\n\nThanks Alex,\n\nThis series (and your svn.authorsfile patch)\nAcked-by: Eric Wong <normalperson@yhbt.net>\n\n..and pushed out to git://git.bogomips.org/git-svn\n-- \nEric Wong\n"}]}