git-svn: Fix for svn paths removed > log-window-size revisions ago
Instead of trying to find the end of the commit history only in the last window, track if we have seen commits yet, and use that to judge if we need to backtrack and look for a tail. Otherwise, conversion can silently lose up to 100 revisions of a branch if it was deleted >100 revisions ago. Signed-off-by: Alex Vandiver <alexmv@mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
Alex Vandiver committed
May 6, 2009 at 16:18 UTC
c69700fe042ad2ecf2904a8b7d8eddc6d52b790b
1 file changed
+5
-1
git-svn.perl
+5
-1
@@ -4438,6 +4438,7 @@ sub gs_fetch_loop_common {
4438
my ($min, $max) = ($base, $head < $base + $inc ? $head : $base + $inc);
4439
my $longest_path = longest_common_path($gsv, $globs);
4440
my $ra_url = $self->{url};
4441
+ my $find_trailing_edge;
4442
while (1) {
4443
my %revs;
4444
my $err;
@@ -4455,8 +4456,10 @@ sub gs_fetch_loop_common {
4456
sub { $revs{$_[1]} = _cb(@_) });
4457
if ($err) {
4458
print "Checked through r$max\r";
4459
+ } else {
4460
+ $find_trailing_edge = 1;
4461
}
4459
- if ($err && $max >= $head) {
4462
+ if ($err and $find_trailing_edge) {
4463
print STDERR "Path '$longest_path' ",
4464
"was probably deleted:\n",
4465
$err->expanded_message,
@@ -4475,6 +4478,7 @@ sub gs_fetch_loop_common {
4478
last;
4479
}
4480
}
4481
+ $find_trailing_edge = 0;
4482
}
4483
$SVN::Error::handler = $err_handler;
4484