From: Christian Biesinger <cbiesinger@web.de>
To: unlisted-recipients:; (no To-header on input)
Subject: [PATCH] Handle the case where cvsps claims a branch is an ancestor of itself
Date: Fri, 10 Feb 2006 22:02:37 +0100 [thread overview]
Message-ID: <200602102102.k1AL2bG0010419@biesi.no-ip.org> (raw)
cvsps sometimes claims that a branch is an ancestor of itself. That confuses
cvsimport. This checkin makes it change the ancestor to HEAD instead.
Signed-off-by: Christian Biesinger <cbiesinger@web.de>
---
On the mozilla.org CVS repository, cvsps managed to output a branch as an
ancestor of itself... This patch allows cvsimport to handle that, although
I'm not sure if this is a good idea (a better fix might be to make cvsps not
do that. I haven't debugged yet why it does this)
git-cvsimport.perl | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
71f7fdb5fd6eccf75ca3c9e070391f94f013dd7e
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 4b8ca95..74d6e10 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -811,6 +811,10 @@ while(<CVS>) {
print "In patchset $patchset: ancestor branch unknown, setting to $opt_o" if $opt_v;
$ancestor = $opt_o;
}
+ if ($ancestor eq $branch) {
+ print "CVSPS INCONSISTENCY: Branch is an ancestor of itself. Setting ancestor to $opt_o\n";
+ $ancestor = $opt_o;
+ }
if(-f "$git_dir/refs/heads/$branch") {
print STDERR "Branch $branch already exists!\n";
$state=11;
--
1.1.6
reply other threads:[~2006-02-10 21:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200602102102.k1AL2bG0010419@biesi.no-ip.org \
--to=cbiesinger@web.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).