git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Ignore commits for which cvsps can't identify a branch

From
CBChristian Biesinger <cbiesinger@web.de>
Date
Feb 10, 2006, 21:02 UTC
Message-ID
<200602102102.k1AL2Xkd010415@biesi.no-ip.org>
cvps sometimes can't identify a branch for a specific revision, it shows
messages like:
  WARNING: revision 1.36.2.2 of file Makefile.in on unnamed branch
and uses #CVSPS_NO_BRANCH as branch name in its output.

This checkin makes it so that git-cvsimport ignores such branches, and when they appear as ancestor branch, it maps them to HEAD.

Signed-off-by: Christian Biesinger <cbiesinger@web.de>
---

I tried to import the Mozilla CVS Repository into git, just for fun, and it failed. This is one of the patches that are required for it.

I hope I did this right, I'm not so familiar with git... Documentation/SubmittingPatches says to mail patches to the maintainer, who is that? :)

 git-cvsimport.perl |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
ed142593c84ba76580e780ce8f12244214023213
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 00fc3ba..4b8ca95 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -799,7 +799,18 @@ while(<CVS>) {
 			$state = 11;
 			next;
 		}
+                if ($branch eq "#CVSPS_NO_BRANCH") {
+			# skip
+			print "skip patchset $patchset: unknown branch\n" if $opt_v;
+			$state = 11;
+			next;
+		}
 		if($ancestor) {
+			if ($ancestor eq "#CVSPS_NO_BRANCH") {
+				# skip
+				print "In patchset $patchset: ancestor branch unknown, setting to $opt_o" if $opt_v;
+				$ancestor = $opt_o;
+			}
 			if(-f "$git_dir/refs/heads/$branch") {
 				print STDERR "Branch $branch already exists!\n";
 				$state=11;
-- 
1.1.6
Next: Junio C Hamano
Message 1 of 6 in “Ignore commits for which cvsps can't identify a branch”
  1. Ignore commits for which cvsps can't identify a branchChristian Biesinger, Feb 10, 2006
  2. Junio C HamanoFeb 10, 2006
  3. Christian BiesingerFeb 10, 2006
  4. Linus TorvaldsFeb 10, 2006
  5. Yann DirsonJun 10, 2006
  6. Christian BiesingerJun 10, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.