{"thread":{"id":"3287","subject":"[PATCH] Ignore commits for which cvsps can't identify a branch","startedAt":"2006-02-10T21:02:33Z","lastAt":"2006-06-10T19:45:46Z","messageCount":6,"participants":["Christian Biesinger","Junio C Hamano","Linus Torvalds","Yann Dirson"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"15859","messageId":"200602102102.k1AL2Xkd010415@biesi.no-ip.org","threadId":"3287","inReplyTo":null,"subject":"[PATCH] Ignore commits for which cvsps can't identify a branch","fromName":"Christian Biesinger","fromEmail":"cbiesinger@web.de","sentAt":"2006-02-10T21:02:33Z","receivedAt":"2006-02-10T21:02:33Z","isPatch":true,"sender":{"key":"cbiesinger@web.de","avatar":null},"body":"cvps sometimes can't identify a branch for a specific revision, it shows\nmessages like:\n  WARNING: revision 1.36.2.2 of file Makefile.in on unnamed branch\nand uses #CVSPS_NO_BRANCH as branch name in its output.\n\nThis checkin makes it so that git-cvsimport ignores such branches, and when they\nappear as ancestor branch, it maps them to HEAD.\n\nSigned-off-by: Christian Biesinger <cbiesinger@web.de>\n\n---\n\nI tried to import the Mozilla CVS Repository into git, just for fun, and it\nfailed. This is one of the patches that are required for it.\n\nI hope I did this right, I'm not so familiar with git...\nDocumentation/SubmittingPatches says to mail patches to the maintainer, who is\nthat? :)\n\n git-cvsimport.perl |   11 +++++++++++\n 1 files changed, 11 insertions(+), 0 deletions(-)\n\ned142593c84ba76580e780ce8f12244214023213\ndiff --git a/git-cvsimport.perl b/git-cvsimport.perl\nindex 00fc3ba..4b8ca95 100755\n--- a/git-cvsimport.perl\n+++ b/git-cvsimport.perl\n@@ -799,7 +799,18 @@ while(<CVS>) {\n \t\t\t$state = 11;\n \t\t\tnext;\n \t\t}\n+                if ($branch eq \"#CVSPS_NO_BRANCH\") {\n+\t\t\t# skip\n+\t\t\tprint \"skip patchset $patchset: unknown branch\\n\" if $opt_v;\n+\t\t\t$state = 11;\n+\t\t\tnext;\n+\t\t}\n \t\tif($ancestor) {\n+\t\t\tif ($ancestor eq \"#CVSPS_NO_BRANCH\") {\n+\t\t\t\t# skip\n+\t\t\t\tprint \"In patchset $patchset: ancestor branch unknown, setting to $opt_o\" if $opt_v;\n+\t\t\t\t$ancestor = $opt_o;\n+\t\t\t}\n \t\t\tif(-f \"$git_dir/refs/heads/$branch\") {\n \t\t\t\tprint STDERR \"Branch $branch already exists!\\n\";\n \t\t\t\t$state=11;\n-- \n1.1.6\n"},{"id":"15864","messageId":"7vmzgyvrih.fsf@assigned-by-dhcp.cox.net","threadId":"3287","inReplyTo":"200602102102.k1AL2Xkd010415@biesi.no-ip.org","subject":"Re: [PATCH] Ignore commits for which cvsps can't identify a branch","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-02-10T21:21:58Z","receivedAt":"2006-02-10T21:21:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Biesinger <cbiesinger@web.de> writes:\n\n> cvps sometimes can't identify a branch for a specific revision, it shows\n> messages like:\n>   WARNING: revision 1.36.2.2 of file Makefile.in on unnamed branch\n> and uses #CVSPS_NO_BRANCH as branch name in its output.\n>\n> This checkin makes it so that git-cvsimport ignores such branches,\n> and when they\n> appear as ancestor branch, it maps them to HEAD.\n\nDoes continuing with this kind of \"fixups\" produce usable\nhistory, perhaps just some changes missing but trees contained\nin other commits are still faithful reproductions of what the\nCVS repository would have given you?  Or does it result in\nunusable history?\n\nDepending on the nature of corruption and its expected use,\nsometimes silently corrupt conversion result is worse than not\nhaving it at all.  If you are going to use it primarily for\narchaeology, it is much more useful to have a more-or-less\ncorrect conversion than not having anything at all, but if you\nare building on top of it, you at least would want to have the\ncorrect tree at the tip of the branch you build upon.  I cannot\noffhand tell how this workaround affects the conversion result,\nhence this question.\n\n> I hope I did this right, I'm not so familiar with git...\n\nThe only gripe I might have is your log message is too wide.\nOther than that it looks like it properly follows the the\nformatting and submitting convention.\n"},{"id":"15867","messageId":"43ED0D63.5090105@web.de","threadId":"3287","inReplyTo":"7vmzgyvrih.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Ignore commits for which cvsps can't identify a branch","fromName":"Christian Biesinger","fromEmail":"cbiesinger@web.de","sentAt":"2006-02-10T22:02:11Z","receivedAt":"2006-02-10T22:02:11Z","isPatch":true,"sender":{"key":"cbiesinger@web.de","avatar":null},"body":"Junio C Hamano wrote:\n> Does continuing with this kind of \"fixups\" produce usable\n> history, perhaps just some changes missing but trees contained\n> in other commits are still faithful reproductions of what the\n> CVS repository would have given you?  Or does it result in\n> unusable history?\n\nI have to admit that I can't actually tell you for sure, since I still \nget a failure later (I think it's because cvsps orders changesets \nwrongly). However, I was told that the revisions that give me this \nCVSPS_NO_BRANCH issue came into existence by (partially) removing tags \nfrom a file, so not listing them should be fine, I think. (This happened \nby copying a ,v file and removing its tags, simulating a file copy)\n\nAnyway, based on that, I expect that the history is the same as what I \nget from cvs, but I can't verify that.\n\n> Depending on the nature of corruption and its expected use,\n> sometimes silently corrupt conversion result is worse than not\n> having it at all.\n\nWell, without the patch this error is fatal, and the conversion is very \npartial. I'm not sure if that's better.\n\n(This is also not \"silent\" corruption. I do show a message for it. Would \nyou rather have it displayed unconditionally?)\n\nWould it be better to have a flag --continue-on-errors?\n"},{"id":"15875","messageId":"Pine.LNX.4.64.0602101517290.19172@g5.osdl.org","threadId":"3287","inReplyTo":"43ED0D63.5090105@web.de","subject":"Re: [PATCH] Ignore commits for which cvsps can't identify a branch","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-02-10T23:25:09Z","receivedAt":"2006-02-10T23:25:09Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 10 Feb 2006, Christian Biesinger wrote:\n> \n> I have to admit that I can't actually tell you for sure, since I still get a\n> failure later (I think it's because cvsps orders changesets wrongly).\n\nDo you have a recent version of \"cvsps\"? The wrong ordering happened quite \noften with old cvsps versions. So make sure you absolutely have 2.1.\n\nAlso, David Mansfield may not be maintaining it horribly actively, but \nthat's probably because it's purely a \"minimal maintenance\" project for \nhim by now. He reacted in a very timely manner when we pointed out \nspecific bugs, so if you can pinpoint the exact thing cvsps does wrong, I \nbet David will be more than happy to apply patches or perhaps even fix it \nhimself and make a new version.\n\nSo while it's fine to work around cvsps problems inside \"git cvsimport\", \nit's even better if you could try to see if you can figure out why they \nhappen in the first place. The source code wasn't all that unreadable from \nwhat I can remember.\n\n\t\tLinus\n"},{"id":"21558","messageId":"20060610192457.GA6620@nowhere.earth","threadId":"3287","inReplyTo":"200602102102.k1AL2Xkd010415@biesi.no-ip.org","subject":"Re: [PATCH] Ignore commits for which cvsps can't identify a branch","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2006-06-10T19:24:57Z","receivedAt":"2006-06-10T19:24:57Z","isPatch":true,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"On Fri, Feb 10, 2006 at 10:02:33PM +0100, Christian Biesinger wrote:\n> cvps sometimes can't identify a branch for a specific revision, it shows\n> messages like:\n>   WARNING: revision 1.36.2.2 of file Makefile.in on unnamed branch\n> and uses #CVSPS_NO_BRANCH as branch name in its output.\n\nThis issue is a bit old, but still...\n\nI have seen such CVSPS_NO_BRANCH things with \"cvsps -u\", and could\nalways get rid of it using \"cvspx -x\".  Christian, did you try to run\n\"cvsps -x\" to be sure the cache is valid, and did it get rid of the\nCVSPS_NO_BRANCH ?  It could help if you could make a cvsps cache\navailable, which exhibits the problem.\n\nBest regards,\n-- \nYann Dirson    <ydirson@altern.org> |\nDebian-related: <dirson@debian.org> |   Support Debian GNU/Linux:\n                                    |  Freedom, Power, Stability, Gratis\n     http://ydirson.free.fr/        | Check <http://www.debian.org/>\n"},{"id":"21559","messageId":"448B216A.6010801@web.de","threadId":"3287","inReplyTo":"20060610192457.GA6620@nowhere.earth","subject":"Re: [PATCH] Ignore commits for which cvsps can't identify a branch","fromName":"Christian Biesinger","fromEmail":"cbiesinger@web.de","sentAt":"2006-06-10T19:45:46Z","receivedAt":"2006-06-10T19:45:46Z","isPatch":true,"sender":{"key":"cbiesinger@web.de","avatar":null},"body":"Yann Dirson wrote:\n> I have seen such CVSPS_NO_BRANCH things with \"cvsps -u\", and could\n> always get rid of it using \"cvspx -x\".  Christian, did you try to run\n> \"cvsps -x\" to be sure the cache is valid, and did it get rid of the\n> CVSPS_NO_BRANCH ?  It could help if you could make a cvsps cache\n> available, which exhibits the problem.\n\nI'm pretty sure that I did use -x and didn't have a cache. Unfortunately \nI don't have anything about that cvsps setup available anymore.\n"}]}