[PATCH] Make test-convert-cvs work with older cvs versions

Christian Ebert blacktrash at gmx.net
Wed Oct 3 13:19:29 UTC 2007


* Patrick Mézard on Wednesday, October 03, 2007 at 14:26:01 +0200
> Christian Ebert a écrit :
>> * Patrick Mézard on Wednesday, October 03, 2007 at 11:57:35 +0200
>>> Does the following work for you ?
>> 
>> In principle yes, but it doesn't apply cleanly, as you seem to
>> have changed test-convert-cvs.out beforehand to comply with cvs
>> 1.11.20.
> 
> Ah sorry, I am trying to fix crew-stable, not -stable.

Errmh, more confusion ;) I patched against latest crew.
crew-stable would have worked for cvs 1.11.20. Anyway, this
should solve it.

> Well, we are not really testing CVS here. We just want to have some 
> feedback about the files being committed, as well as debugging context 
> the test were to failed. I guess listing the files is enough.

Right.

>> BTW, what is faster:
>> 
>> grep -F '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
>> or
>> sed -e '/<--/!d' -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
>> ?
> 
> I don't really know. I am only concerned about portability here, since 
> these commands are not issued in a loop. I think the first one is better 
> in this regard.

Ok.

> Just one question, is there any reason for the "-F"
> optimizations aside ?

None. You're right, omit the "-F", otherwise we might run into
more portability troubles. I thought "-F" or fgrep was save, but
apparently, according to
<http://www.mkssoftware.com/docs/man1/grep.1.asp>, they're both
extensions to POSIX.

OTOH,
<http://www.selenic.com/mercurial/wiki/index.cgi/WritingTests#head-84b3bf712c7124b3d5650a5be6a0b954b73b72cb>
encourages the use of egrep, which is also an extension.

At least, in this case, we can just omit "-F" and be safe ;)

> BTW, thanks for the report and the patch !

You're welcome.

c
-- 
keyword extension for Mercurial (http://selenic.com/mercurial):
<http://www.blacktrash.org/hg/hgkeyword/> (0.9.2 backwards compatible)
Mercurial crew development repository + keyword extension:
<http://www.blacktrash.org/hg/hg-crew-keyword/>



More information about the Mercurial-devel mailing list