diff options
author | Eric Wong <normalperson@yhbt.net> | 2007-01-23 13:03:29 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2007-02-23 00:57:09 -0800 |
commit | 9bf046372b370fba8958ba6ef9dc63b232d7637c (patch) | |
tree | 48f3bc83a9cf23419b94fde41744c11611bdd977 | |
parent | git-svn: allow 'init' to work outside of tests (diff) | |
download | tgif-9bf046372b370fba8958ba6ef9dc63b232d7637c.tar.xz |
git-svn: better error reporting if --follow-parent fails
This will be useful to me when I try more special-cases
of parent-tracking.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
-rwxr-xr-x | git-svn.perl | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/git-svn.perl b/git-svn.perl index a70e7b9110..de026b4e4c 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -1056,10 +1056,12 @@ sub revisions_eq { sub find_parent_branch { my ($self, $paths, $rev) = @_; + return undef unless $::_follow_parent; # look for a parent from another branch: - my $i = $paths->{'/'.$self->rel_path} or return; - my $branch_from = $i->copyfrom_path or return; + my $abs_path = '/'.$self->rel_path; + my $i = $paths->{$abs_path} or goto not_found; + my $branch_from = $i->copyfrom_path or goto not_found; my $r = $i->copyfrom_rev; my $repos_root = $self->ra->{repos_root}; my $url = $self->ra->{url}; @@ -1118,7 +1120,16 @@ sub find_parent_branch { } return $self->make_log_entry($rev, [$parent], $ed); } - print STDERR "Branch parent not found...\n"; +not_found: + print STDERR "Branch parent for path: '$abs_path' not found\n"; + return undef unless $paths; + foreach my $p (sort keys %$paths) { + print STDERR ' ', $p->action, ' ', $p; + if (my $cp_from = $p->copyfrom_path) { + print STDERR "(from $cp_from:", $p->copyfrom_rev, ')'; + } + print STDERR "\n"; + } return undef; } |