Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
[PATCH] archimport: Actually cope with merges from "remote" repositories. Plus: Nicer messages.
author
Martin Langhoff
<martin@catalyst.net.nz>
Fri, 30 Sep 2005 07:15:12 +0000
(19:15 +1200)
committer
Junio C Hamano
<junkio@cox.net>
Sun, 2 Oct 2005 06:14:48 +0000
(23:14 -0700)
archimport was refusing to import commits that had merges from repositories
that it didn't know about. Fixed.
Also brings in nicer messages.
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-archimport.perl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
38ec15a
)
diff --git
a/git-archimport.perl
b/git-archimport.perl
index 3749b8b5728f7bdb0f6adb317b25ecfa81902042..980e827b27ae0fa9a07667501d4cb26b5673cedf 100755
(executable)
--- a/
git-archimport.perl
+++ b/
git-archimport.perl
@@
-228,10
+228,12
@@
END
# skip commits already in repo
#
if (ptag($ps->{id})) {
# skip commits already in repo
#
if (ptag($ps->{id})) {
- $opt_v && print "Skipping already imported: $ps->{id}\n";
+ $opt_v && print "
*
Skipping already imported: $ps->{id}\n";
next;
}
next;
}
+ print " * Starting to work on $ps->{id}\n";
+
#
# create the branch if needed
#
#
# create the branch if needed
#
@@
-675,6
+677,10
@@
sub find_parents {
# that branch.
#
foreach my $branch (keys %branches) {
# that branch.
#
foreach my $branch (keys %branches) {
+
+ # check that we actually know about the branch
+ next unless -e "$git_dir/refs/heads/$branch";
+
my $mergebase = `git-merge-base $branch $ps->{branch}`;
die "Cannot find merge base for $branch and $ps->{branch}" if $?;
chomp $mergebase;
my $mergebase = `git-merge-base $branch $ps->{branch}`;
die "Cannot find merge base for $branch and $ps->{branch}" if $?;
chomp $mergebase;