{"thread":{"id":"43426","subject":"Re: Diffs from CVS keyword expansion","startedAt":"2006-12-01T03:56:57Z","lastAt":"2006-12-06T10:08:35Z","messageCount":11,"participants":["Junio C Hamano","Randal L. Schwartz","Jon Smirl","Robin Rosenberg","Linus Torvalds","Uwe Kleine-Koenig","Johannes Schindelin","Juergen Ruehle"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"297155","messageId":"9e4733910611301956l6f64b01ftee46971a18e3467b@mail.gmail.com","threadId":"43426","inReplyTo":null,"subject":"Diffs from CVS keyword expansion","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2006-12-01T03:56:57Z","receivedAt":"2006-12-01T03:56:57Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"Anyone have a nice script for suppressing diffs caused by CVS keyword\nexpansion when someone checked the kernel sources into CVS?\n\nI have 200,000 lines of various forms of this mixed in with real changes\n\nIt is unclear who checked it into CVS, Microcross or Arch Linux. If it\nis Arch Linux finding the source for their 2.6.11.4-1 release would\nhelp a lot. I looked on their web site and couldn't locate it.\n\nI'm starting understand why the support for MX21 on a CSB535FS has\nnever been added to the mainline.\n\ndiff --git a/drivers/char/ftape/lowlevel/ftape-ctl.c\nb/drivers/char/ftape/lowlevel/ftape-ctl.c\nindex 32e0439..ff10633 100644\n--- a/drivers/char/ftape/lowlevel/ftape-ctl.c\n+++ b/drivers/char/ftape/lowlevel/ftape-ctl.c\n@@ -17,9 +17,9 @@\n  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\n\n  *\n- * $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/ftape-ctl.c,v $\n- * $Revision: 1.4 $\n- * $Date: 1997/11/11 14:37:44 $\n+ * $Source: /home/arch-linux/{cvs}/linux--dev--2.6/drivers/char/ftape/lowlevel/ftape-ctl.c,v\n$\n+ * $Revision: 1.1.1.1 $\n+ * $Date: 2005/03/24 06:16:39 $\n  *\n  *      This file contains the non-read/write ftape functions for the\n  *      QIC-40/80/3010/3020 floppy-tape driver \"ftape\" for Linux.\ndiff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c\nb/drivers/infiniband/ulp/ipoib/ipoib_main.c\nindex 63c8168..54d9a10 100644\n--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c\n+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c\n@@ -29,7 +29,7 @@\n  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n  * SOFTWARE.\n  *\n- * $Id: ipoib_main.c 1377 2004-12-23 19:57:12Z roland $\n+ * $Id: ipoib_main.c,v 1.1.1.1 2005/03/24 06:16:41 arch-linux Exp $\n  */\n\n #include \"ipoib.h\"\n\n-- \nJon Smirl\n"},{"id":"298385","messageId":"17775.54363.376000.140259@lapjr.intranet.kiel.bmiag.de","threadId":"43426","inReplyTo":"9e4733910611301956l6f64b01ftee46971a18e3467b@mail.gmail.com","subject":"Re: Diffs from CVS keyword expansion","fromName":"Juergen Ruehle","fromEmail":"j.ruehle@bmiag.de","sentAt":"2006-12-01T07:06:03Z","receivedAt":"2006-12-01T07:06:03Z","isPatch":false,"sender":{"key":"j.ruehle@bmiag.de","avatar":null},"body":"Jon Smirl writes:\n > Anyone have a nice script for suppressing diffs caused by CVS keyword\n > expansion when someone checked the kernel sources into CVS?\n\nI usually just say (with GNU diff)\n\n  diff -I $$ ...\n\nwhich is crude, but should be enough to get rid of the hunks listed by\nyou.\n\nYou might also want -x CVS if you have the metadata files.\n"},{"id":"296347","messageId":"Pine.LNX.4.64.0611302340030.3695@woody.osdl.org","threadId":"43426","inReplyTo":"17775.54363.376000.140259@lapjr.intranet.kiel.bmiag.de","subject":"Re: Diffs from CVS keyword expansion","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-12-01T07:44:41Z","receivedAt":"2006-12-01T07:44:41Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 1 Dec 2006, Juergen Ruehle wrote:\n\n> Jon Smirl writes:\n>  > Anyone have a nice script for suppressing diffs caused by CVS keyword\n>  > expansion when someone checked the kernel sources into CVS?\n> \n> I usually just say (with GNU diff)\n> \n>   diff -I $$ ...\n> \n> which is crude, but should be enough to get rid of the hunks listed by\n> you.\n> \n> You might also want -x CVS if you have the metadata files.\n\nAlso, if you are actually _using_ CVS to check it out, use\n\n\tcvs co -ko\n\nI think, to not check out with keyword expansion at all.\n\n(Also usable with \"cvs diff -ko\", I think)\n\n\t\tLinus\n\nPS. Clueless user alert: I have happily not used CVS in years and years, \n"},{"id":"295698","messageId":"9e4733910612010733x4dea2451r6fc64d2e867735a@mail.gmail.com","threadId":"43426","inReplyTo":"Pine.LNX.4.64.0611302340030.3695@woody.osdl.org","subject":"Re: Diffs from CVS keyword expansion","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2006-12-01T15:33:03Z","receivedAt":"2006-12-01T15:33:03Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 12/1/06, Linus Torvalds <torvalds@osdl.org> wrote:\n>\n>\n> On Fri, 1 Dec 2006, Juergen Ruehle wrote:\n>\n> > Jon Smirl writes:\n> >  > Anyone have a nice script for suppressing diffs caused by CVS keyword\n> >  > expansion when someone checked the kernel sources into CVS?\n> >\n> > I usually just say (with GNU diff)\n> >\n> >   diff -I $$ ...\n> >\n> > which is crude, but should be enough to get rid of the hunks listed by\n> > you.\n> >\n> > You might also want -x CVS if you have the metadata files.\n\nI don't have the original CVS, just a tarball snapshot with the\nkeywords expanded.\n\nI'm working with the Freescale iMX21 and the Linux port for it has\nnever be added to the mainline kernel. I am extracting bits and pieces\nof it from various vendor tarballs.\n\n\n>\n> Also, if you are actually _using_ CVS to check it out, use\n>\n>         cvs co -ko\n>\n> I think, to not check out with keyword expansion at all.\n>\n> (Also usable with \"cvs diff -ko\", I think)\n>\n>                 Linus\n>\n> PS. Clueless user alert: I have happily not used CVS in years and years,\n> and I might remember that all wrong.\n>\n\n\n-- \nJon Smirl\n"},{"id":"298359","messageId":"20061205121443.GB2428@cepheus","threadId":"43426","inReplyTo":"9e4733910611301956l6f64b01ftee46971a18e3467b@mail.gmail.com","subject":"Re: Diffs from CVS keyword expansion","fromName":"Uwe Kleine-Koenig","fromEmail":"zeisberg@informatik.uni-freiburg.de","sentAt":"2006-12-05T12:14:43Z","receivedAt":"2006-12-05T12:14:43Z","isPatch":false,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello Jon,\n\nJon Smirl wrote:\n> Anyone have a nice script for suppressing diffs caused by CVS keyword\n> expansion when someone checked the kernel sources into CVS?\nI have a little script (called rmcvsid) in my private path, that just\nwraps a Perl oneliner:\n\n\t#! /bin/sh\n\texec perl -i -p -e 's/\\$(Id|Revision):.*?\\$/\\$$1: \\$/' \"$@\";\n\nThis edits inplace all cvs keywords to be not expanded.  If you call it\nfor all files *before* you throw them into git, you don't need to\nsuppress the diffs, because there are none.\n\nYou may have to add Source, Date and maybe others.\n\nHTH\nUwe\n\n-- \nUwe Kleine-Koenig\n\n"},{"id":"298190","messageId":"86k616m8i9.fsf@blue.stonehenge.com","threadId":"43426","inReplyTo":"20061205121443.GB2428@cepheus","subject":"Re: Diffs from CVS keyword expansion","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2006-12-05T19:45:50Z","receivedAt":"2006-12-05T19:45:50Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Uwe\" == Uwe Kleine-Koenig <zeisberg@informatik.uni-freiburg.de> writes:\n\nUwe> \t#! /bin/sh\nUwe> \texec perl -i -p -e 's/\\$(Id|Revision):.*?\\$/\\$$1: \\$/' \"$@\";\n\nOw.  My eyes hurt from that.  How about we rewrite that as a native Perl\nscript:\n\n    #!/usr/bin/perl\n    $^I = \"\"; # this is -i\n    while (<>) {\n      s/\\$(Id|Revision):.*?\\$/\\$$1: \\$/;\n      print;\n    }\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\n"},{"id":"297191","messageId":"Pine.LNX.4.63.0612052048230.28348@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"43426","inReplyTo":"86k616m8i9.fsf@blue.stonehenge.com","subject":"Re: Diffs from CVS keyword expansion","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-12-05T19:48:51Z","receivedAt":"2006-12-05T19:48:51Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 5 Dec 2006, Randal L. Schwartz wrote:\n\n> >>>>> \"Uwe\" == Uwe Kleine-Koenig <zeisberg@informatik.uni-freiburg.de> writes:\n> \n> Uwe> \t#! /bin/sh\n> Uwe> \texec perl -i -p -e 's/\\$(Id|Revision):.*?\\$/\\$$1: \\$/' \"$@\";\n> \n> Ow.  My eyes hurt from that.  How about we rewrite that as a native Perl\n> script:\n> \n>     #!/usr/bin/perl\n>     $^I = \"\"; # this is -i\n>     while (<>) {\n>       s/\\$(Id|Revision):.*?\\$/\\$$1: \\$/;\n>       print;\n>     }\n\nHey, that's better! All of a sudden, I understand everything!\n\nNot,\nDscho\n"},{"id":"294738","messageId":"7v64cqglsm.fsf@assigned-by-dhcp.cox.net","threadId":"43426","inReplyTo":"86k616m8i9.fsf@blue.stonehenge.com","subject":"Re: Diffs from CVS keyword expansion","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-12-05T19:55:21Z","receivedAt":"2006-12-05T19:55:21Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"merlyn@stonehenge.com (Randal L. Schwartz) writes:\n\n>>>>>> \"Uwe\" == Uwe Kleine-Koenig <zeisberg@informatik.uni-freiburg.de> writes:\n>\n> Uwe> \t#! /bin/sh\n> Uwe> \texec perl -i -p -e 's/\\$(Id|Revision):.*?\\$/\\$$1: \\$/' \"$@\";\n>\n> Ow.  My eyes hurt from that.  How about we rewrite that as a native Perl\n> script:\n>\n>     #!/usr/bin/perl\n>     $^I = \"\"; # this is -i\n>     while (<>) {\n>       s/\\$(Id|Revision):.*?\\$/\\$$1: \\$/;\n>       print;\n>     }\n\nThat's kinda surprising coming from the resident Perl guru.\n\nI am so used to the command line \"-i -p\" that I did not even\nknow what $^I does, and I would have lost without your \"# this\nis -i\" comment.  That alone makes the Uwe's one more readable\nfor me ;-).\n"},{"id":"296296","messageId":"200612052130.52247.robin.rosenberg.lists@dewire.com","threadId":"43426","inReplyTo":"7v64cqglsm.fsf@assigned-by-dhcp.cox.net","subject":"Re: Diffs from CVS keyword expansion","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2006-12-05T20:30:52Z","receivedAt":"2006-12-05T20:30:52Z","isPatch":false,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"tisdag 05 december 2006 20:55 skrev Junio C Hamano:\n> merlyn@stonehenge.com (Randal L. Schwartz) writes:\n> >>>>>> \"Uwe\" == Uwe Kleine-Koenig <zeisberg@informatik.uni-freiburg.de>\n> >>>>>> writes:\n> >\n> > Uwe> \t#! /bin/sh\n> > Uwe> \texec perl -i -p -e 's/\\$(Id|Revision):.*?\\$/\\$$1: \\$/' \"$@\";\n> >\n> > Ow.  My eyes hurt from that.  How about we rewrite that as a native Perl\n> > script:\n> >\n> >     #!/usr/bin/perl\n> >     $^I = \"\"; # this is -i\n> >     while (<>) {\n> >       s/\\$(Id|Revision):.*?\\$/\\$$1: \\$/;\n> >       print;\n> >     }\n>\n> That's kinda surprising coming from the resident Perl guru.\n>\n> I am so used to the command line \"-i -p\" that I did not even\n> know what $^I does, and I would have lost without your \"# this\n> is -i\" comment.  That alone makes the Uwe's one more readable\n> for me ;-).\nMay I suggest a compromise? : \n\n#!/usr/bin/perl -i -p\ns/\\$(Id|Revision):.*?\\$/\\$$1: \\$/;\n\n"},{"id":"296856","messageId":"20061206100514.GA7126@informatik.uni-freiburg.de","threadId":"43426","inReplyTo":"Pine.LNX.4.63.0612052048230.28348@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: Diffs from CVS keyword expansion","fromName":"Uwe Kleine-Koenig","fromEmail":"zeisberg@informatik.uni-freiburg.de","sentAt":"2006-12-06T10:05:14Z","receivedAt":"2006-12-06T10:05:14Z","isPatch":false,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hi,\n\nJohannes Schindelin wrote:\n> On Tue, 5 Dec 2006, Randal L. Schwartz wrote:\n> \n> > >>>>> \"Uwe\" == Uwe Kleine-Koenig <zeisberg@informatik.uni-freiburg.de> writes:\n> > \n> > Uwe> \t#! /bin/sh\n> > Uwe> \texec perl -i -p -e 's/\\$(Id|Revision):.*?\\$/\\$$1: \\$/' \"$@\";\n> > \n> > Ow.  My eyes hurt from that.  How about we rewrite that as a native Perl\n> > script:\nI don't like that either, just because it's Perl :-)\n\n> >     #!/usr/bin/perl\n> >     $^I = \"\"; # this is -i\n> >     while (<>) {\n> >       s/\\$(Id|Revision):.*?\\$/\\$$1: \\$/;\n> >       print;\n> >     }\n> \n> Hey, that's better! All of a sudden, I understand everything!\nI'm not fluent in Perl, and didn't know $^I.  Actually, that's better,\nyes.  (And my script is already rewritten.)\n\nOne thing I don't like about both scripts is, that the timestamp of\na file changes with that, even if there are no changes.  Anyone knows\nanother predefined variable/trick that doesn't hurt performance (and\nreadability) too much?\n\ntimtowtdi\nUwe\n\n-- \nUwe Kleine-Koenig\n\n"},{"id":"295217","messageId":"86irgpl4kc.fsf@blue.stonehenge.com","threadId":"43426","inReplyTo":"20061206100514.GA7126@informatik.uni-freiburg.de","subject":"Re: Diffs from CVS keyword expansion","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2006-12-06T10:08:35Z","receivedAt":"2006-12-06T10:08:35Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Uwe\" == Uwe Kleine-Koenig <zeisberg@informatik.uni-freiburg.de> writes:\nUwe> One thing I don't like about both scripts is, that the timestamp of\nUwe> a file changes with that, even if there are no changes.  Anyone knows\nUwe> another predefined variable/trick that doesn't hurt performance (and\nUwe> readability) too much?\n\nYou have to do two passes, or a pass-and-a-half, and do the rename/rewrite\nbased on whether anything changed.\n\n\"Just a few more lines of code.\" :)  If it's really important, I can\nbe coaxed to dig it up.\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\n"}]}