Skip to content

Commit 577e9fc

Browse files
author
Eric Wong
committed
git svn: fix --revision when fetching deleted paths
When using the -r/--revision argument to fetch deleted history, calling SVN::Ra::get_log() from an SVN::Ra object initialized to track the deleted URL will fail. This regression was introduced in: commit 4aacaeb "fix shallow clone when upstream revision is too new" We now ignore errors from SVN::Ra::get_log() here because using --revision will always override the value of $head here if (and only if) we're tracking deleted directories. Signed-off-by: Eric Wong <[email protected]>
1 parent ab0964d commit 577e9fc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

git-svn.perl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1741,7 +1741,11 @@ sub fetch_all {
17411741
my $ra = Git::SVN::Ra->new($url);
17421742
my $uuid = $ra->get_uuid;
17431743
my $head = $ra->get_latest_revnum;
1744-
$ra->get_log("", $head, 0, 1, 0, 1, sub { $head = $_[1] });
1744+
1745+
# ignore errors, $head revision may not even exist anymore
1746+
eval { $ra->get_log("", $head, 0, 1, 0, 1, sub { $head = $_[1] }) };
1747+
warn "W: $@\n" if $@;
1748+
17451749
my $base = defined $fetch ? $head : 0;
17461750

17471751
# read the max revs for wildcard expansion (branches/*, tags/*)

0 commit comments

Comments
 (0)