summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 536c4b0)
raw | patch | inline | side by side (parent: 536c4b0)
author | Eric Wong <normalperson@yhbt.net> | |
Tue, 23 Jan 2007 21:03:29 +0000 (13:03 -0800) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Fri, 23 Feb 2007 08:57:09 +0000 (00:57 -0800) |
This will be useful to me when I try more special-cases
of parent-tracking.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
of parent-tracking.
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 a70e7b911014b0b74e8e263ca888a911d41405d7..de026b4e4ccc607adc347797f50e9f3ccded3a83 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
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};
}
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;
}