Skip to content

Commit

Permalink
git-svn: Fix for svn paths removed > log-window-size revisions ago
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Vandiver authored and Eric Wong committed May 21, 2009
1 parent da083d6 commit c69700f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -4438,6 +4438,7 @@ sub gs_fetch_loop_common {
my ($min, $max) = ($base, $head < $base + $inc ? $head : $base + $inc);
my $longest_path = longest_common_path($gsv, $globs);
my $ra_url = $self->{url};
my $find_trailing_edge;
while (1) {
my %revs;
my $err;
Expand All @@ -4455,8 +4456,10 @@ sub gs_fetch_loop_common {
sub { $revs{$_[1]} = _cb(@_) });
if ($err) {
print "Checked through r$max\r";
} else {
$find_trailing_edge = 1;
}
if ($err && $max >= $head) {
if ($err and $find_trailing_edge) {
print STDERR "Path '$longest_path' ",
"was probably deleted:\n",
$err->expanded_message,
Expand All @@ -4475,6 +4478,7 @@ sub gs_fetch_loop_common {
last;
}
}
$find_trailing_edge = 0;
}
$SVN::Error::handler = $err_handler;

Expand Down

0 comments on commit c69700f

Please sign in to comment.