Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-01-29 08:34:23 +0300
committerEric Wong <normalperson@yhbt.net>2007-02-23 11:57:10 +0300
commitce2a0f2f9d9fd8eee8eaa1f24a60bdafade80c24 (patch)
treeb4281f271a1e3afb9c813eb64f9b6a73f305db8e /git-svn.perl
parent2b27f6c8847ebee631e7ad17ac9986e461d7674b (diff)
git-svn: stop using path names as refnames with --follow-parent
Using path names as refnames breaks horribly if a user is tracking one large, toplevel directory, and a lower-level directory is followed from another project is a parent of another ref, as it will cause refnames such as: 'refs/remotes/trunk/path/to/stuff', which will conflict with a refname of 'refs/remotes/trunk'. Now we just append @$revno to the end of it the current refname. And if we have followed back to a grandparent, then we'll strip any existing '@$parent_revno' strings before appending our own '@$revno' string to it. Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl6
1 files changed, 4 insertions, 2 deletions
diff --git a/git-svn.perl b/git-svn.perl
index dcc7fd4603..4f7938ab7e 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1135,10 +1135,12 @@ sub find_parent_branch {
last if $gs;
}
unless ($gs) {
- my $ref_id = $branch_from;
- $ref_id .= "\@$r" if find_ref($ref_id);
+ my $ref_id = $self->{ref_id};
+ $ref_id =~ s/\@\d+$//;
+ $ref_id .= "\@$r";
# just grow a tail if we're not unique enough :x
$ref_id .= '-' while find_ref($ref_id);
+ print STDERR "Initializing parent: $ref_id\n";
$gs = Git::SVN->init($new_url, '', $ref_id, $ref_id);
}
my ($r0, $parent) = $gs->find_rev_before($r, 1);