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

Subsystems: the rest

STALE3735d

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Christian Biesinger <hidden>
Date: 2016-06-15 22:42:18

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 <redacted>

---

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

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

From: Yann Dirson <hidden>
Date: 2016-06-15 22:42:29

On Fri, Feb 10, 2006 at 10:02:33PM +0100, Christian Biesinger wrote:
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 issue is a bit old, but still...

I have seen such CVSPS_NO_BRANCH things with "cvsps -u", and could
always get rid of it using "cvspx -x".  Christian, did you try to run
"cvsps -x" to be sure the cache is valid, and did it get rid of the
CVSPS_NO_BRANCH ?  It could help if you could make a cvsps cache
available, which exhibits the problem.

Best regards,
-- 
Yann Dirson    [off-list ref] |
Debian-related: [off-list ref] |   Support Debian GNU/Linux:
                                    |  Freedom, Power, Stability, Gratis
     http://ydirson.free.fr/        | Check <http://www.debian.org/>

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

From: Christian Biesinger <hidden>
Date: 2016-06-15 22:42:29

Yann Dirson wrote:
I have seen such CVSPS_NO_BRANCH things with "cvsps -u", and could
always get rid of it using "cvspx -x".  Christian, did you try to run
"cvsps -x" to be sure the cache is valid, and did it get rid of the
CVSPS_NO_BRANCH ?  It could help if you could make a cvsps cache
available, which exhibits the problem.
I'm pretty sure that I did use -x and didn't have a cache. Unfortunately 
I don't have anything about that cvsps setup available anymore.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help