{"thread":{"id":"3295","subject":"[PATCH] Don't propagate SKIPPED warning to future commits.","startedAt":"2006-02-11T01:41:28Z","lastAt":"2006-02-11T14:47:39Z","messageCount":3,"participants":["Carl Worth","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"15890","messageId":"87r76avfhz.wl%cworth@cworth.org","threadId":"3295","inReplyTo":null,"subject":"[PATCH] Don't propagate SKIPPED warning to future commits.","fromName":"Carl Worth","fromEmail":"cworth@cworth.org","sentAt":"2006-02-11T01:41:28Z","receivedAt":"2006-02-11T01:41:28Z","isPatch":true,"sender":{"key":"cworth@cworth.org","avatar":"https://gravatar.com/avatar/3746dc28cde609bdbd7f939058356e7e2bbd16d21e32274df0725eb3d998bc5b?d=mp&s=160"},"body":"Here's a simple bug fix for the (currently undocumented) -S flag to\ngit-cvsimport.\n\nThe -S flag allows an import to proceed in the face of a missing ,v\nfile in the CVS repository. It marks this by adding a SKIPPED warning\nin the relevant commit.\n\nWithout this patch, the SKIPPED warning propagates to all future\ncommits, (and accumulates with future SKIPPED warnings).\n\nMartin did the original work on -S to fix an import of the cairo\nrepository.\n\nHowever, I just discovered that a correct fix for the cairo import\nproblem was for me to just \"rm -rf ~/.cvsps\". (I suppose calling with\na -x option would have worked too.)\n\nI don't know how common it is for CVS repositories to change in ways\nsuch that the cvsps cache gets totally confused as in my case, but it\nmight be worth adding something to cvsimport to help this. Some\noptions could be:\n\n * Use cvsps -x always, to ignore the cache.\n\n * Warn the user, (perhaps emit some description of stale cache\n   possibility if the import fails?).\n\n * Add a note to the documentation.\n\nSigned-off-by: Carl Worth <cworth@cworth.org>\n\n---\n\n git-cvsimport.perl |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\nc816d743a1faf65fb209273a471b15c7b51b55df\ndiff --git a/git-cvsimport.perl b/git-cvsimport.perl\nindex 6b63aa2..25db0ed 100755\n--- a/git-cvsimport.perl\n+++ b/git-cvsimport.perl\n@@ -749,6 +749,7 @@ my $commit = sub {\n \tif (@skipped) {\n \t    $logmsg .= \"\\n\\n\\nSKIPPED:\\n\\t\";\n \t    $logmsg .= join(\"\\n\\t\", @skipped) . \"\\n\";\n+\t    @skipped = ();\n \t}\n \n \tprint $pw \"$logmsg\\n\"\n-- \n1.1.6.g9da5\n"},{"id":"15894","messageId":"7vpslutz2t.fsf@assigned-by-dhcp.cox.net","threadId":"3295","inReplyTo":"87r76avfhz.wl%cworth@cworth.org","subject":"Re: [PATCH] Don't propagate SKIPPED warning to future commits.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-02-11T02:21:30Z","receivedAt":"2006-02-11T02:21:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Carl Worth <cworth@cworth.org> writes:\n\n> Here's a simple bug fix for the (currently undocumented) -S flag to\n> git-cvsimport.\n>\n> The -S flag allows an import to proceed in the face of a missing ,v\n> file in the CVS repository. It marks this by adding a SKIPPED warning\n> in the relevant commit.\n>\n> Without this patch, the SKIPPED warning propagates to all future\n> commits, (and accumulates with future SKIPPED warnings).\n\nI might be missing something fundamental, but isn't prapagating\nthe warning a good thing?  If an earlier commit is suspected to\nlack some path that needs to be there (I think that is what\n\"missing ,v file\" means), wouldn't later commits built on top of\nthat one be by definition missing that path?\n"},{"id":"15923","messageId":"87psluuf3o.wl%cworth@cworth.org","threadId":"3295","inReplyTo":"7vpslutz2t.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Don't propagate SKIPPED warning to future commits.","fromName":"Carl Worth","fromEmail":"cworth@cworth.org","sentAt":"2006-02-11T14:47:39Z","receivedAt":"2006-02-11T14:47:39Z","isPatch":true,"sender":{"key":"cworth@cworth.org","avatar":"https://gravatar.com/avatar/3746dc28cde609bdbd7f939058356e7e2bbd16d21e32274df0725eb3d998bc5b?d=mp&s=160"},"body":"On Fri, 10 Feb 2006 18:21:30 -0800, Junio C Hamano wrote:\n> \n> I might be missing something fundamental, but isn't propagating\n> the warning a good thing?\n\nYes, that would be fine.\n\nThe problem with the current behavior is that the warnings accumulate\nfor every commit that affects the particular file. So, after import,\nthe head commit will have a commit message ending in:\n\n\tSKIPPED: broken-file\n\tSKIPPED: broken-file\n\tSKIPPED: broken-file\n\t...\n\nWith one line per affected commit. So an alternate patch that simply\nkept the warning unique per file would be fine too.\n\nThe discussion may be entirely moot since I don't know when it is\nreasonable for a file to be missing in this way. In my specific case I\nthink the missing ,v file happened due to a combination of factors,\nincluding old data in ~/.cvsps, and that data being stale due to some\nmanual surgery on the ,v files, (copying or renaming or so).\n\nIt would probably be fine to leave the current behavior until someone\nruns into this again.\n\n-Carl\n"}]}