* Diffs from CVS keyword expansion
@ 2006-12-01 3:56 Jon Smirl
2006-12-01 7:06 ` Juergen Ruehle
2006-12-05 12:14 ` Uwe Kleine-Koenig
0 siblings, 2 replies; 11+ messages in thread
From: Jon Smirl @ 2006-12-01 3:56 UTC (permalink / raw)
To: Git Mailing List
Anyone have a nice script for suppressing diffs caused by CVS keyword
expansion when someone checked the kernel sources into CVS?
I have 200,000 lines of various forms of this mixed in with real changes
It is unclear who checked it into CVS, Microcross or Arch Linux. If it
is Arch Linux finding the source for their 2.6.11.4-1 release would
help a lot. I looked on their web site and couldn't locate it.
I'm starting understand why the support for MX21 on a CSB535FS has
never been added to the mainline.
diff --git a/drivers/char/ftape/lowlevel/ftape-ctl.c
b/drivers/char/ftape/lowlevel/ftape-ctl.c
index 32e0439..ff10633 100644
--- a/drivers/char/ftape/lowlevel/ftape-ctl.c
+++ b/drivers/char/ftape/lowlevel/ftape-ctl.c
@@ -17,9 +17,9 @@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/ftape-ctl.c,v $
- * $Revision: 1.4 $
- * $Date: 1997/11/11 14:37:44 $
+ * $Source: /home/arch-linux/{cvs}/linux--dev--2.6/drivers/char/ftape/lowlevel/ftape-ctl.c,v
$
+ * $Revision: 1.1.1.1 $
+ * $Date: 2005/03/24 06:16:39 $
*
* This file contains the non-read/write ftape functions for the
* QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux.
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c
b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 63c8168..54d9a10 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -29,7 +29,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
- * $Id: ipoib_main.c 1377 2004-12-23 19:57:12Z roland $
+ * $Id: ipoib_main.c,v 1.1.1.1 2005/03/24 06:16:41 arch-linux Exp $
*/
#include "ipoib.h"
--
Jon Smirl
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: Diffs from CVS keyword expansion
2006-12-01 3:56 Diffs from CVS keyword expansion Jon Smirl
@ 2006-12-01 7:06 ` Juergen Ruehle
2006-12-01 7:44 ` Linus Torvalds
2006-12-05 12:14 ` Uwe Kleine-Koenig
1 sibling, 1 reply; 11+ messages in thread
From: Juergen Ruehle @ 2006-12-01 7:06 UTC (permalink / raw)
To: Jon Smirl; +Cc: Git Mailing List
Jon Smirl writes:
> Anyone have a nice script for suppressing diffs caused by CVS keyword
> expansion when someone checked the kernel sources into CVS?
I usually just say (with GNU diff)
diff -I $$ ...
which is crude, but should be enough to get rid of the hunks listed by
you.
You might also want -x CVS if you have the metadata files.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Diffs from CVS keyword expansion
2006-12-01 7:06 ` Juergen Ruehle
@ 2006-12-01 7:44 ` Linus Torvalds
2006-12-01 15:33 ` Jon Smirl
0 siblings, 1 reply; 11+ messages in thread
From: Linus Torvalds @ 2006-12-01 7:44 UTC (permalink / raw)
To: Juergen Ruehle; +Cc: Jon Smirl, Git Mailing List
On Fri, 1 Dec 2006, Juergen Ruehle wrote:
> Jon Smirl writes:
> > Anyone have a nice script for suppressing diffs caused by CVS keyword
> > expansion when someone checked the kernel sources into CVS?
>
> I usually just say (with GNU diff)
>
> diff -I $$ ...
>
> which is crude, but should be enough to get rid of the hunks listed by
> you.
>
> You might also want -x CVS if you have the metadata files.
Also, if you are actually _using_ CVS to check it out, use
cvs co -ko
I think, to not check out with keyword expansion at all.
(Also usable with "cvs diff -ko", I think)
Linus
PS. Clueless user alert: I have happily not used CVS in years and years,
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Diffs from CVS keyword expansion
2006-12-01 7:44 ` Linus Torvalds
@ 2006-12-01 15:33 ` Jon Smirl
0 siblings, 0 replies; 11+ messages in thread
From: Jon Smirl @ 2006-12-01 15:33 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Juergen Ruehle, Git Mailing List
On 12/1/06, Linus Torvalds <torvalds@osdl.org> wrote:
>
>
> On Fri, 1 Dec 2006, Juergen Ruehle wrote:
>
> > Jon Smirl writes:
> > > Anyone have a nice script for suppressing diffs caused by CVS keyword
> > > expansion when someone checked the kernel sources into CVS?
> >
> > I usually just say (with GNU diff)
> >
> > diff -I $$ ...
> >
> > which is crude, but should be enough to get rid of the hunks listed by
> > you.
> >
> > You might also want -x CVS if you have the metadata files.
I don't have the original CVS, just a tarball snapshot with the
keywords expanded.
I'm working with the Freescale iMX21 and the Linux port for it has
never be added to the mainline kernel. I am extracting bits and pieces
of it from various vendor tarballs.
>
> Also, if you are actually _using_ CVS to check it out, use
>
> cvs co -ko
>
> I think, to not check out with keyword expansion at all.
>
> (Also usable with "cvs diff -ko", I think)
>
> Linus
>
> PS. Clueless user alert: I have happily not used CVS in years and years,
> and I might remember that all wrong.
>
--
Jon Smirl
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Diffs from CVS keyword expansion
2006-12-01 3:56 Diffs from CVS keyword expansion Jon Smirl
2006-12-01 7:06 ` Juergen Ruehle
@ 2006-12-05 12:14 ` Uwe Kleine-Koenig
2006-12-05 19:45 ` Randal L. Schwartz
1 sibling, 1 reply; 11+ messages in thread
From: Uwe Kleine-Koenig @ 2006-12-05 12:14 UTC (permalink / raw)
To: Jon Smirl; +Cc: Git Mailing List
Hello Jon,
Jon Smirl wrote:
> Anyone have a nice script for suppressing diffs caused by CVS keyword
> expansion when someone checked the kernel sources into CVS?
I have a little script (called rmcvsid) in my private path, that just
wraps a Perl oneliner:
#! /bin/sh
exec perl -i -p -e 's/\$(Id|Revision):.*?\$/\$$1: \$/' "$@";
This edits inplace all cvs keywords to be not expanded. If you call it
for all files *before* you throw them into git, you don't need to
suppress the diffs, because there are none.
You may have to add Source, Date and maybe others.
HTH
Uwe
--
Uwe Kleine-Koenig
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Diffs from CVS keyword expansion
2006-12-05 12:14 ` Uwe Kleine-Koenig
@ 2006-12-05 19:45 ` Randal L. Schwartz
2006-12-05 19:48 ` Johannes Schindelin
2006-12-05 19:55 ` Junio C Hamano
0 siblings, 2 replies; 11+ messages in thread
From: Randal L. Schwartz @ 2006-12-05 19:45 UTC (permalink / raw)
To: Uwe Kleine-Koenig; +Cc: Jon Smirl, Git Mailing List
>>>>> "Uwe" == Uwe Kleine-Koenig <zeisberg@informatik.uni-freiburg.de> writes:
Uwe> #! /bin/sh
Uwe> exec perl -i -p -e 's/\$(Id|Revision):.*?\$/\$$1: \$/' "$@";
Ow. My eyes hurt from that. How about we rewrite that as a native Perl
script:
#!/usr/bin/perl
$^I = ""; # this is -i
while (<>) {
s/\$(Id|Revision):.*?\$/\$$1: \$/;
print;
}
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Diffs from CVS keyword expansion
2006-12-05 19:45 ` Randal L. Schwartz
@ 2006-12-05 19:48 ` Johannes Schindelin
2006-12-06 10:05 ` Uwe Kleine-Koenig
2006-12-05 19:55 ` Junio C Hamano
1 sibling, 1 reply; 11+ messages in thread
From: Johannes Schindelin @ 2006-12-05 19:48 UTC (permalink / raw)
To: Randal L. Schwartz; +Cc: Uwe Kleine-Koenig, Jon Smirl, Git Mailing List
Hi,
On Tue, 5 Dec 2006, Randal L. Schwartz wrote:
> >>>>> "Uwe" == Uwe Kleine-Koenig <zeisberg@informatik.uni-freiburg.de> writes:
>
> Uwe> #! /bin/sh
> Uwe> exec perl -i -p -e 's/\$(Id|Revision):.*?\$/\$$1: \$/' "$@";
>
> Ow. My eyes hurt from that. How about we rewrite that as a native Perl
> script:
>
> #!/usr/bin/perl
> $^I = ""; # this is -i
> while (<>) {
> s/\$(Id|Revision):.*?\$/\$$1: \$/;
> print;
> }
Hey, that's better! All of a sudden, I understand everything!
Not,
Dscho
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Diffs from CVS keyword expansion
2006-12-05 19:48 ` Johannes Schindelin
@ 2006-12-06 10:05 ` Uwe Kleine-Koenig
2006-12-06 10:08 ` Randal L. Schwartz
0 siblings, 1 reply; 11+ messages in thread
From: Uwe Kleine-Koenig @ 2006-12-06 10:05 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Randal L. Schwartz, Jon Smirl, Git Mailing List
Hi,
Johannes Schindelin wrote:
> On Tue, 5 Dec 2006, Randal L. Schwartz wrote:
>
> > >>>>> "Uwe" == Uwe Kleine-Koenig <zeisberg@informatik.uni-freiburg.de> writes:
> >
> > Uwe> #! /bin/sh
> > Uwe> exec perl -i -p -e 's/\$(Id|Revision):.*?\$/\$$1: \$/' "$@";
> >
> > Ow. My eyes hurt from that. How about we rewrite that as a native Perl
> > script:
I don't like that either, just because it's Perl :-)
> > #!/usr/bin/perl
> > $^I = ""; # this is -i
> > while (<>) {
> > s/\$(Id|Revision):.*?\$/\$$1: \$/;
> > print;
> > }
>
> Hey, that's better! All of a sudden, I understand everything!
I'm not fluent in Perl, and didn't know $^I. Actually, that's better,
yes. (And my script is already rewritten.)
One thing I don't like about both scripts is, that the timestamp of
a file changes with that, even if there are no changes. Anyone knows
another predefined variable/trick that doesn't hurt performance (and
readability) too much?
timtowtdi
Uwe
--
Uwe Kleine-Koenig
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Diffs from CVS keyword expansion
2006-12-06 10:05 ` Uwe Kleine-Koenig
@ 2006-12-06 10:08 ` Randal L. Schwartz
0 siblings, 0 replies; 11+ messages in thread
From: Randal L. Schwartz @ 2006-12-06 10:08 UTC (permalink / raw)
To: Uwe Kleine-Koenig; +Cc: Johannes Schindelin, Jon Smirl, Git Mailing List
>>>>> "Uwe" == Uwe Kleine-Koenig <zeisberg@informatik.uni-freiburg.de> writes:
Uwe> One thing I don't like about both scripts is, that the timestamp of
Uwe> a file changes with that, even if there are no changes. Anyone knows
Uwe> another predefined variable/trick that doesn't hurt performance (and
Uwe> readability) too much?
You have to do two passes, or a pass-and-a-half, and do the rename/rewrite
based on whether anything changed.
"Just a few more lines of code." :) If it's really important, I can
be coaxed to dig it up.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Diffs from CVS keyword expansion
2006-12-05 19:45 ` Randal L. Schwartz
2006-12-05 19:48 ` Johannes Schindelin
@ 2006-12-05 19:55 ` Junio C Hamano
2006-12-05 20:30 ` Robin Rosenberg
1 sibling, 1 reply; 11+ messages in thread
From: Junio C Hamano @ 2006-12-05 19:55 UTC (permalink / raw)
To: Randal L. Schwartz; +Cc: git
merlyn@stonehenge.com (Randal L. Schwartz) writes:
>>>>>> "Uwe" == Uwe Kleine-Koenig <zeisberg@informatik.uni-freiburg.de> writes:
>
> Uwe> #! /bin/sh
> Uwe> exec perl -i -p -e 's/\$(Id|Revision):.*?\$/\$$1: \$/' "$@";
>
> Ow. My eyes hurt from that. How about we rewrite that as a native Perl
> script:
>
> #!/usr/bin/perl
> $^I = ""; # this is -i
> while (<>) {
> s/\$(Id|Revision):.*?\$/\$$1: \$/;
> print;
> }
That's kinda surprising coming from the resident Perl guru.
I am so used to the command line "-i -p" that I did not even
know what $^I does, and I would have lost without your "# this
is -i" comment. That alone makes the Uwe's one more readable
for me ;-).
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Diffs from CVS keyword expansion
2006-12-05 19:55 ` Junio C Hamano
@ 2006-12-05 20:30 ` Robin Rosenberg
0 siblings, 0 replies; 11+ messages in thread
From: Robin Rosenberg @ 2006-12-05 20:30 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Randal L. Schwartz, git
tisdag 05 december 2006 20:55 skrev Junio C Hamano:
> merlyn@stonehenge.com (Randal L. Schwartz) writes:
> >>>>>> "Uwe" == Uwe Kleine-Koenig <zeisberg@informatik.uni-freiburg.de>
> >>>>>> writes:
> >
> > Uwe> #! /bin/sh
> > Uwe> exec perl -i -p -e 's/\$(Id|Revision):.*?\$/\$$1: \$/' "$@";
> >
> > Ow. My eyes hurt from that. How about we rewrite that as a native Perl
> > script:
> >
> > #!/usr/bin/perl
> > $^I = ""; # this is -i
> > while (<>) {
> > s/\$(Id|Revision):.*?\$/\$$1: \$/;
> > print;
> > }
>
> That's kinda surprising coming from the resident Perl guru.
>
> I am so used to the command line "-i -p" that I did not even
> know what $^I does, and I would have lost without your "# this
> is -i" comment. That alone makes the Uwe's one more readable
> for me ;-).
May I suggest a compromise? :
#!/usr/bin/perl -i -p
s/\$(Id|Revision):.*?\$/\$$1: \$/;
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2006-12-06 10:09 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-01 3:56 Diffs from CVS keyword expansion Jon Smirl
2006-12-01 7:06 ` Juergen Ruehle
2006-12-01 7:44 ` Linus Torvalds
2006-12-01 15:33 ` Jon Smirl
2006-12-05 12:14 ` Uwe Kleine-Koenig
2006-12-05 19:45 ` Randal L. Schwartz
2006-12-05 19:48 ` Johannes Schindelin
2006-12-06 10:05 ` Uwe Kleine-Koenig
2006-12-06 10:08 ` Randal L. Schwartz
2006-12-05 19:55 ` Junio C Hamano
2006-12-05 20:30 ` Robin Rosenberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).