diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-12-09 22:41:27 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-12-09 22:41:27 -0800 |
commit | 5363d0744e7360beee990d3c2a8c1eb64a23071e (patch) | |
tree | c533c7ab0c236fa5b621c5aaddb7aed3e734bae1 /git-svn.perl | |
parent | 3aa1f7ca3779f73164b285c070b71abcdd7397c1 (diff) | |
parent | aa971cb9bf4105eefb435b9e6f282f019529c35f (diff) | |
download | git-5363d0744e7360beee990d3c2a8c1eb64a23071e.tar.gz |
Merge branch 'maint'
* maint:
work around Python warnings from AsciiDoc
git-svn: Make following parents atomic
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-x | git-svn.perl | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/git-svn.perl b/git-svn.perl index e64e97b4de..2c206e9178 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -2403,12 +2403,20 @@ sub find_parent_branch { $gs = Git::SVN->init($u, $p, $repo_id, $ref_id, 1); } my ($r0, $parent) = $gs->find_rev_before($r, 1); - if (!defined $r0 || !defined $parent) { - my ($base, $head) = parse_revision_argument(0, $r); - if ($base <= $r) { + { + my ($base, $head); + if (!defined $r0 || !defined $parent) { + ($base, $head) = parse_revision_argument(0, $r); + } else { + if ($r0 < $r) { + $gs->ra->get_log([$gs->{path}], $r0 + 1, $r, 1, + 0, 1, sub { $base = $_[1] - 1 }); + } + } + if (defined $base && $base <= $r) { $gs->fetch($base, $r); } - ($r0, $parent) = $gs->last_rev_commit; + ($r0, $parent) = $gs->find_rev_before($r, 1); } if (defined $r0 && defined $parent) { print STDERR "Found branch parent: ($self->{ref_id}) $parent\n"; |