info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How well does CVS handle other types of data?


From: Greg A. Woods
Subject: Re: How well does CVS handle other types of data?
Date: Mon, 16 Jul 2001 18:53:45 -0400 (EDT)

[ On Monday, July 16, 2001 at 15:04:59 (-0700), Paul Sander wrote: ]
> Subject: Re: How well does CVS handle other types of data?
>
> If the existing diff3-based algorithm is replaced by another one, as I have
> proposed, then a different method is needed to check for conflicts that does
> not look for diff3's artifacts.  IF that merge algorithm produces some
> artifact that persists after the merge and disappears after an edit (like
> diff3's mark-ups do) then CVS's current conflict detection method should be
> replaced with a different one that matches merge algorithm and data type.

Sure.  OK.  That's all irrelevant though until you or someone gives us
some working code to play with....

> The requirement is that CVS commit any file that's given to it.

No, that's not any requirement whatsoever.  CVS deals only with source
files.  See my previous posting for yet another definition of source
files.

> If you do this, then at least use the same conflict detector that CVS does.
> CVS uses the following, rather than the complicated egrep expression that
> Greg gives:
> 
>       grep '^>>>>>>> '

Why don't you read the code Paul?  CVS does not use grep or egrep.

Note also that three different strings are matched by the default CVS,
and four by my version.

The realtively simple RE I gave is not only correct (it finds all the
markers in logically the same manner as CVS does), but it also finds
additional markers that might be inserted if you also use my patch to
use 'diff3 -A' instead of 'diff3 -E'.

BTW, complexity is in the eye of the beholder, and cut&paste ignores all
interpretation (leaving it up to the tool in question).

That expression, again, is:

 find / -type f -print | xargs egrep -l '^<<<<<<< |^=======$|^>>>>>>> 
|^\|\|\|\|\|\|\| '

Leave out the last term if you don't care about 'diff3 -A' conflicts.

(use 'find -X' or '-print0' or '-printx' as appropriate with 'xargs -0'
if your filesystem contains filenames with spaces, tabs, or newlines)

(I could make my now enhanced fgrep available with it's new '-S' option
though, and that would considerably shorten the above RE, and make the
internal search algorithm much more identical to the one used by
CVS. :-)

-- 
                                                        Greg A. Woods

+1 416 218-0098      VE3TCP      <address@hidden>     <address@hidden>
Planix, Inc. <address@hidden>;   Secrets of the Weird <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]