From: Jakob Stoklund Olesen <stoklund@2pi.dk>
To: git@vger.kernel.org
Cc: Eric Wong <normalperson@yhbt.net>, Sam Vilain <sam@vilain.net>,
Steven Walter <stevenrwalter@gmail.com>,
Peter Baumann <waste.manager@gmx.de>,
Andrew Myrick <amyrick@apple.com>,
Jakob Stoklund Olesen <stoklund@2pi.dk>
Subject: [PATCH 2/2] git-svn: only look at the root path for svn:mergeinfo
Date: Wed, 16 Apr 2014 23:54:06 -0700 [thread overview]
Message-ID: <1397717646-54248-2-git-send-email-stoklund@2pi.dk> (raw)
In-Reply-To: <1397717646-54248-1-git-send-email-stoklund@2pi.dk>
Subversion can put mergeinfo on any sub-directory to track cherry-picks.
Since cherry-picks are not represented explicitly in git, git-svn should
just ignore it.
Signed-off-by: Jakob Stoklund Olesen <stoklund@2pi.dk>
---
perl/Git/SVN.pm | 29 +++++++++++++----------------
1 file changed, 13 insertions(+), 16 deletions(-)
diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
index d3785ab..0aa4dd3 100644
--- a/perl/Git/SVN.pm
+++ b/perl/Git/SVN.pm
@@ -1210,7 +1210,7 @@ sub do_fetch {
unless ($self->ra->gs_do_update($last_rev, $rev, $self, $ed)) {
die "SVN connection failed somewhere...\n";
}
- $self->make_log_entry($rev, \@parents, $ed, $last_rev);
+ $self->make_log_entry($rev, \@parents, $ed, $last_rev, $self->path);
}
sub mkemptydirs {
@@ -1859,21 +1859,18 @@ sub make_log_entry {
my $untracked = $self->get_untracked($ed);
my @parents = @$parents;
- my $ps = $ed->{path_strip} || "";
- for my $path ( grep { m/$ps/ } %{$ed->{dir_prop}} ) {
- my $props = $ed->{dir_prop}{$path};
- if ( $props->{"svk:merge"} ) {
- $self->find_extra_svk_parents
- ($ed, $props->{"svk:merge"}, \@parents);
- }
- if ( $props->{"svn:mergeinfo"} ) {
- my $mi_changes = $self->mergeinfo_changes
- ($parent_path || $path, $parent_rev,
- $path, $rev,
- $props->{"svn:mergeinfo"});
- $self->find_extra_svn_parents
- ($ed, $mi_changes, \@parents);
- }
+ my $props = $ed->{dir_prop}{$self->path};
+ if ( $props->{"svk:merge"} ) {
+ $self->find_extra_svk_parents
+ ($ed, $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
+ ($ed, $mi_changes, \@parents);
}
open my $un, '>>', "$self->{dir}/unhandled.log" or croak $!;
--
1.8.5.2 (Apple Git-48)
next prev parent reply other threads:[~2014-04-17 6:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-17 6:54 [PATCH 1/2] git-svn: only look at the new parts of svn:mergeinfo Jakob Stoklund Olesen
2014-04-17 6:54 ` Jakob Stoklund Olesen [this message]
2014-04-22 18:54 ` [PATCH 2/2] git-svn: only look at the root path for svn:mergeinfo Eric Wong
2014-04-27 19:00 ` Jakob Stoklund Olesen
2014-04-22 18:47 ` [PATCH 1/2] git-svn: only look at the new parts of svn:mergeinfo Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1397717646-54248-2-git-send-email-stoklund@2pi.dk \
--to=stoklund@2pi.dk \
--cc=amyrick@apple.com \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
--cc=sam@vilain.net \
--cc=stevenrwalter@gmail.com \
--cc=waste.manager@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).