summaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-06-20 21:52:53 +0000
committerEric Wong <e@80x24.org>2016-06-22 22:48:54 +0000
commit6d523a3ab76cfa4ed9ae0ed9da7af43efcff3f07 (patch)
treed7d2e71cd88e82063af59f8d096413898312dbb2 /perl
parentab7797dbe95fff38d9265869ea367020046db118 (diff)
downloadgit-6d523a3ab76cfa4ed9ae0ed9da7af43efcff3f07.tar.gz
git-svn: skip mergeinfo handling with --no-follow-parent
For repositories without parent following enabled, finding git parents through svn:mergeinfo or svk::parents can be expensive and pointless. Reported-by: Александр Овчинников <proff@proff.email> http://mid.gmane.org/4094761466408188@web24o.yandex.ru Signed-off-by: Eric Wong <e@80x24.org>
Diffstat (limited to 'perl')
-rw-r--r--perl/Git/SVN.pm25
1 files changed, 16 insertions, 9 deletions
diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
index d94d01cfdc..bee1e7d1cb 100644
--- a/perl/Git/SVN.pm
+++ b/perl/Git/SVN.pm
@@ -1905,15 +1905,22 @@ sub make_log_entry {
my @parents = @$parents;
my $props = $ed->{dir_prop}{$self->path};
- if ( $props->{"svk:merge"} ) {
- $self->find_extra_svk_parents($props->{"svk:merge"}, \@parents);
- }
- if ( $props->{"svn:mergeinfo"} ) {
- my $mi_changes = $self->mergeinfo_changes
- ($parent_path, $parent_rev,
- $self->path, $rev,
- $props->{"svn:mergeinfo"});
- $self->find_extra_svn_parents($mi_changes, \@parents);
+ if ($self->follow_parent) {
+ my $tickets = $props->{"svk:merge"};
+ if ($tickets) {
+ $self->find_extra_svk_parents($tickets, \@parents);
+ }
+
+ my $mergeinfo_prop = $props->{"svn:mergeinfo"};
+ if ($mergeinfo_prop) {
+ my $mi_changes = $self->mergeinfo_changes(
+ $parent_path,
+ $parent_rev,
+ $self->path,
+ $rev,
+ $mergeinfo_prop);
+ $self->find_extra_svn_parents($mi_changes, \@parents);
+ }
}
open my $un, '>>', "$self->{dir}/unhandled.log" or croak $!;