summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ab0964d)
raw | patch | inline | side by side (parent: ab0964d)
author | Eric Wong <normalperson@yhbt.net> | |
Mon, 21 Dec 2009 10:06:04 +0000 (02:06 -0800) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Mon, 21 Dec 2009 10:32:39 +0000 (02:32 -0800) |
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 4aacaeb3dc82bb6479e70e120053dc27a399460e
"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 <normalperson@yhbt.net>
calling SVN::Ra::get_log() from an SVN::Ra object initialized
to track the deleted URL will fail.
This regression was introduced in:
commit 4aacaeb3dc82bb6479e70e120053dc27a399460e
"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 <normalperson@yhbt.net>
git-svn.perl | patch | blob | history |
diff --git a/git-svn.perl b/git-svn.perl
index d362de7364e1e67808846cc891b706dc8029bb20..a6f5061c3c356076af797f6d3373ef5f9ca870a3 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
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/*)