git svn: fix --revision when fetching deleted paths
[gitweb.git] / git-svn.perl
index d362de7364e1e67808846cc891b706dc8029bb20..a6f5061c3c356076af797f6d3373ef5f9ca870a3 100755 (executable)
@@ -1741,7 +1741,11 @@ sub fetch_all {
        my $ra = Git::SVN::Ra->new($url);
        my $uuid = $ra->get_uuid;
        my $head = $ra->get_latest_revnum;
-       $ra->get_log("", $head, 0, 1, 0, 1, sub { $head = $_[1] });
+
+       # ignore errors, $head revision may not even exist anymore
+       eval { $ra->get_log("", $head, 0, 1, 0, 1, sub { $head = $_[1] }) };
+       warn "W: $@\n" if $@;
+
        my $base = defined $fetch ? $head : 0;
 
        # read the max revs for wildcard expansion (branches/*, tags/*)