bug-cvs
[Top][All Lists]
Advanced

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

Re: CVS merge issue: "cvs update -j -j"


From: bjacob
Subject: Re: CVS merge issue: "cvs update -j -j"
Date: Fri, 4 Apr 2003 11:12:19 -0800

Pierre Asselin writes:
> Frederic Gioanni <address@hidden> wrote:
> 
> >[ common ancestor has lines abc; sandbox has line a; branch has lines abcde ]
> >
> > When doing the merge, I am expecting 2 new lines and so I am expecting
> > the following conflict:
> 
> >     a
> >     <<<<<<< file
> >     =======
> >     d
> >     e
> >     >>>>>>> rev2
> 
> > However, "cvs up -j -j" ends with:
> 
> >     a
> >     <<<<<<< file
> >     =======
> >     b
> >     c
> >     d
> >     e
> >     >>>>>>> rev2
> >
> >[ ... ]
> >
> >  CVS uses the following command to merge:
> >     diff3  -E  -am  -L  file  -Lrev1  -Lrev2  file  file:rev1  file:rev2
> 
> Does cvs still use diff3?

It used to call the external program diff3, but the current cvs has
its own copy of the diff3 source code linked in.  So cvs no longer
calls an external program.

>  In any case, diff3 itself seems confused.  With
> three files 'base', 'rev1' and 'rev2' as you describe, I get
> 
>     $ diff3 -E -m rev1 base rev2
>     a
>     <<<<<<< rev1
>     =======
>     b
>     c
>     d
>     e
>     >>>>>>> rev2
> 
> which is wrong.  But if I remove the '-E' option,
> 
>     a
>     <<<<<<< rev1
>     ||||||| base
>     b
>     c
>     =======
>     b
>     c
>     d
>     e
>     >>>>>>> rev2
> 
> which is the conflict I would like to see.  Is cvs mis-invoking a diff3
> command?  Is it misusing the algorithm?

-E merely causes diff3 to use a different style of output.  Some
people prefer the -E style and other's prefer the style without -E.  I
think I tend to prefer it without -E.  However, I believe that it
gives correct output both with and without -E.

I don't think cvs allows you to specify whether you want diff3 to use
-E, but it might be a good idea to add a cvs option for this.
However, I am not interested enough to volunteer to add this myself.




reply via email to

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