{"thread":{"id":"27284","subject":"git-p4 and keyword substitution","startedAt":"2011-05-06T17:26:18Z","lastAt":"2011-05-06T19:29:55Z","messageCount":2,"participants":["Michael Horowitz","Luke Diamand"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"167266","messageId":"BANLkTinLW3Ty4n1ODKU-N000q7qQUoSDTQ@mail.gmail.com","threadId":"27284","inReplyTo":null,"subject":"git-p4 and keyword substitution","fromName":"Michael Horowitz","fromEmail":"michael.horowitz@ieee.org","sentAt":"2011-05-06T17:26:18Z","receivedAt":"2011-05-06T17:26:18Z","isPatch":false,"sender":{"key":"michael.horowitz@ieee.org","avatar":null},"body":"All,\n\nI was wondering if there is a way to deal with this issue...\n\nIt seems that git removes the keyword substitutions from Perforce.\nThis is fine, except for the fact that it does not remove them from\nthe p4 client shadow.  So, this causes git-p4 submit to fail whenever\nit either deletes a file with keywords (since the file it is deleting\nhas the keywords and doesn't match) or lines close to the keywords\nchange, such that applying the patch doesn't work.\n\nA Google search turned up a thread from a few years ago where someone\nsubmitted a patch to make removing the keyword substitutions optional,\nbut I guess that patch never got accepted, at least not that I can\nsee.\n\nIs there any other way of dealing with this?\n\nThanks,\n\nMike\n"},{"id":"167276","messageId":"4DC44C33.7060903@diamand.org","threadId":"27284","inReplyTo":"BANLkTinLW3Ty4n1ODKU-N000q7qQUoSDTQ@mail.gmail.com","subject":"Re: git-p4 and keyword substitution","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2011-05-06T19:29:55Z","receivedAt":"2011-05-06T19:29:55Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On 06/05/11 18:26, Michael Horowitz wrote:\n> All,\n>\n> I was wondering if there is a way to deal with this issue...\n>\n> It seems that git removes the keyword substitutions from Perforce.\n> This is fine, except for the fact that it does not remove them from\n> the p4 client shadow.  So, this causes git-p4 submit to fail whenever\n> it either deletes a file with keywords (since the file it is deleting\n> has the keywords and doesn't match) or lines close to the keywords\n> change, such that applying the patch doesn't work.\n>\n> A Google search turned up a thread from a few years ago where someone\n> submitted a patch to make removing the keyword substitutions optional,\n> but I guess that patch never got accepted, at least not that I can\n> see.\n>\n> Is there any other way of dealing with this?\n\nI had exactly the same problem only yesterday, and found exactly the \nsame thread!\n\nI made a patch to git-p4 which zaps the RCS keywords in the perforce \ncheckout if a conflict occurs.\n\nI got as far as something which works if you just delete a line, but \nfails if you delete the entire file. And is a bit ugly.\n\nI was going to ask the exact question you've asked though, to see if \nthere's a better way.\n\nLuke\n"}]}