{"thread":{"id":"14478","subject":"git-cvsexportcommit keyword mismatch issue","startedAt":"2008-07-16T09:09:06Z","lastAt":"2008-07-16T23:16:26Z","messageCount":3,"participants":["Barak A. Pearlmutter","Johannes Schindelin","Lars Noschinski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"83490","messageId":"E1KJ30U-0004EL-BV@corti","threadId":"14478","inReplyTo":null,"subject":"git-cvsexportcommit keyword mismatch issue","fromName":"Barak A. Pearlmutter","fromEmail":"barak@cs.nuim.ie","sentAt":"2008-07-16T09:09:06Z","receivedAt":"2008-07-16T09:09:06Z","isPatch":false,"sender":{"key":"barak@cs.nuim.ie","avatar":null},"body":"I used git-cvsimport -k to create my own git repo to deal with a\nproject that uses CVS.  I push my mods upstream using\ngit-cvsexportcommit.  This works fine *unless* there is a keyword\nmismatch, i.e., some file in git has $Id: foo$ while in CVS keyword\nexpansion somehow changed it to $Id: bar$.  In that case\ngit-cvsexportcommit barfs with a patch failure.\n\nWhen that happens I use git-format-patch to generate a patch file and\nintegrate it manually.  BLECH!  This also confuses git-cvsimport when\nI try to pull upstream changes, so I end up manually resolving the\nkeyword conflict again at that point, i.e., twice.\n\nSimply avoiding expanded keywords should solve the problem.  I thought\ngit-cvsimport -k would keep them out of my git repo, but no such luck.\nEven when I use \"cvs checkout -kk\" for the CVS sandbox and then\n\"git-cvsimport -k\", keywords were *still* expanded in my git repo.\n(This is with both git 1.4.4.4 and git 1.5.6.)  Either the -k switch\nto git-cvsimport is busted, or I'm doing something wrong.  In any case\neven if this approached worked it would introduce a host of new\nissues, since others on the project *are* using keyword expansion, and\nthe build process relies upon them.\n\nOne solution that occurs to me would be for git-cvsexportcommit to do\nthe dirty work of ignoring keyword mismatches for files that do not\nhave keywords disabled in CVS.  It seems like it is in the best\nposition to solve the problem---everything else is hacking around to\navoid it instead of actually solving it, which gets brittle.  So what\nI'm hoping is that this lengthy discourse of mine will convince\nsomeone to add code to git-cvsexportcommit that causes the patch\ncreation and application stuff inside it to ignore keyword expansion\nmismatches (on files which do not have -kb on in CVS), perhaps by\nsimply contracting keywords on all files/patches from both CVS/git at\nan early stage.\n\nThe same hack could be used in git-cvsimport to avoid the same problem\nin the other direction, albeit with a little more work since keywords\nthat were not unexpanded in the git files would need to be re-expanded\nin git to avoid gratuitous keyword-value-change patches.\n\n\nOr perhaps I'm missing some other solution...?\n--\nBarak A. Pearlmutter\n Hamilton Institute & Dept Comp Sci, NUI Maynooth, Co. Kildare, Ireland\n http://www.bcl.hamilton.ie/~barak/\n"},{"id":"83493","messageId":"alpine.DEB.1.00.0807161229460.8503@eeepc-johanness","threadId":"14478","inReplyTo":"E1KJ30U-0004EL-BV@corti","subject":"Re: git-cvsexportcommit keyword mismatch issue","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-07-16T10:31:11Z","receivedAt":"2008-07-16T10:31:11Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 16 Jul 2008, Barak A. Pearlmutter wrote:\n\n> So what I'm hoping is that this lengthy discourse of mine will convince \n> someone to add code to git-cvsexportcommit that causes the patch \n> creation and application stuff inside it to ignore keyword expansion \n> mismatches (on files which do not have -kb on in CVS), perhaps by simply \n> contracting keywords on all files/patches from both CVS/git at an early \n> stage.\n\nI doubt that this is going to happen.  Obviously, it has been nonbody's \nitch _enough_ to scratch it.\n\nI see your problem, but unless you start hacking, I do not see it being \nsolved anytime soon.\n\nCiao,\nDscho\n"},{"id":"83624","messageId":"20080716231622.GA5399@lars.home.noschinski.de","threadId":"14478","inReplyTo":"E1KJ30U-0004EL-BV@corti","subject":"Re: git-cvsexportcommit keyword mismatch issue","fromName":"Lars Noschinski","fromEmail":"lars-2008-1@usenet.noschinski.de","sentAt":"2008-07-16T23:16:26Z","receivedAt":"2008-07-16T23:16:26Z","isPatch":false,"sender":{"key":"lars-2008-1@usenet.noschinski.de","avatar":null},"body":"* Barak A. Pearlmutter <barak@cs.nuim.ie> [08-07-16 11:09]:\n>Simply avoiding expanded keywords should solve the problem.  I thought\n>git-cvsimport -k would keep them out of my git repo, but no such luck.\n>Even when I use \"cvs checkout -kk\" for the CVS sandbox and then\n>\"git-cvsimport -k\", keywords were *still* expanded in my git repo.\n>(This is with both git 1.4.4.4 and git 1.5.6.)  Either the -k switch\n>to git-cvsimport is busted, or I'm doing something wrong.\n\ngit-cvsimport -k works for me as of version 1.5.5.2 and 1.5.6.2.\n\nIn my opinion, git-cvsexportcommit misses an option -k to do cvs update\nwith -kk (as -kk is sticky for already checked out files, but not for\nthe whole repository, so new files will not get -kk set). If I cannot\nget rid of this cvs repository soon, I'll probably cook up a patch for\nit.\n"}]}