Administrative tag a possibility?
Mike Smith wrote: ... Say introducing a convention like '$!$' to denote an always to be acceptable change? No, not acceptable. In this case, mergemaster should be smart enough to notice that the file in question was unchanged before the merge, and just not irritate you in the first place. You've just won my vote! Nonetheless I think a simple pattern match like $!$ could've been implemented long ago - thus saving me uncounted q+i keypresses, whereas introducing smartness into a program might take a tad longer. Wasn't there a discussion on something like this ages ago? I seem to recall somebody suggesting MD5 checksums to see if a file has changed or not and acting acordingly. If you're worried about maintaining a database of checksums, why not place it in the file itself. Of course somebody'll mention recursion: if you grep -v CHECKSUM | md5 and compare with grep CHECKSUM, you've got something that works and is easy to maintain. Just my 2p worth :) Stewart. -- Stewart Morgan MEng AMIEEE Technical Director, Nameless-UK T: +44 117 974 55 44| A: The Production House F: +44 870 168 02 10|147a St. Michael's Hill E: [EMAIL PROTECTED] |Bristol W: www.nameless-uk.com |BS2 8DB To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-stable in the body of the message
Re: Administrative tag a possibility?
Stewart Morgan wrote: Wasn't there a discussion on something like this ages ago? I seem to recall somebody suggesting MD5 checksums to see if a file has changed or not and acting acordingly. If you're worried about maintaining a database of checksums, why not place it in the file itself. Of course somebody'll mention recursion: if you grep -v CHECKSUM | md5 and compare with grep CHECKSUM, you've got something that works and is easy to maintain. That seems a little dangerous - perhaps some of the files will have md5 appearing in other lines for other reasons, and that would mess up this simple grep. Perhaps a more complicated tag in the file would be more appropriate. -- Stephen Montgomery-Smith [EMAIL PROTECTED] http://www.math.missouri.edu/~stephen To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-stable in the body of the message
Re: Administrative tag a possibility?
On Thu, May 17, 2001 at 07:43:27AM -0500, Stephen Montgomery-Smith wrote: That seems a little dangerous - perhaps some of the files will have md5 appearing in other lines for other reasons, and that would mess up this simple grep. Perhaps a more complicated tag in the file would be more appropriate. Not to mention that, AFAIK, once you add the checksum to the file, the checksum would be different because the file is no longer the same, ne? I am not aware of a way to include a checksum in the file being checked. Jamie -- Stephen Montgomery-Smith [EMAIL PROTECTED] http://www.math.missouri.edu/~stephen To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-stable in the body of the message
Re: Administrative tag a possibility?
On Thu, May 17, 2001 at 09:31:27AM -0400, Jamie Norwood wrote: On Thu, May 17, 2001 at 07:43:27AM -0500, Stephen Montgomery-Smith wrote: That seems a little dangerous - perhaps some of the files will have md5 appearing in other lines for other reasons, and that would mess Read 'CHECKSUM' instead of 'md5' and your statement is correct. up this simple grep. Perhaps a more complicated tag in the file would be more appropriate. Not to mention that, AFAIK, once you add the checksum to the file, the checksum would be different because the file is no longer the same, ne? I am not aware of a way to include a checksum in the file being checked. Ehm, the original poster did the grep -v thing to avoid this, and I'm reasonably sure he also envisioned using a better tag than 'CHECKSUM' - it's the principle that's worth implementing. Anyway, I also haven't got any patches so I'll shut up now. --Stijn -- Tact, n.: The unsaid part of what you're thinking. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-stable in the body of the message
Re: Administrative tag a possibility?
Uh, please don't use BCC to send to the list, it makes replying a tad impossible. On Thu, 17 May 2001, Jamie Norwood wrote: On Thu, May 17, 2001 at 07:43:27AM -0500, Stephen Montgomery-Smith wrote: That seems a little dangerous - perhaps some of the files will have md5 appearing in other lines for other reasons, and that would mess up this simple grep. Perhaps a more complicated tag in the file would be more appropriate. Not to mention that, AFAIK, once you add the checksum to the file, the checksum would be different because the file is no longer the same, ne? I am not aware of a way to include a checksum in the file being checked. There was a method in the message you quoted: - # Some config file # $FreeBSD: blah$ # $MD5-Checksum: abcdefg8273912$ # Foo a=1 b=2 - # (this is a Perl regexp, but it's possible with grep, somehow, I'm sure. CHECKSUM=`grep -v \$MD5-Checksum(: [0-9a-fA-F]*)?\$$ | md5` and it's easy enough to use sed to replace $MD5-Checksum$ lines with CHECKSUM, and also compare the two... CVS could even be setup to automagically insert the checksum, as it does with the $FreeBSD$ lines currently.. (Doing so whilst observing the various weird -ki flags to disable $$ expansions would be more difficult, however). -- David Taylor [EMAIL PROTECTED] PGP signature