[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Merging bug (wrong conflicts)
From: |
Karl Tomlinson |
Subject: |
Re: Merging bug (wrong conflicts) |
Date: |
Thu, 22 Feb 2001 17:25:48 +1300 |
Jacob Burckhardt wrote:
>
> I saw different results than you. You said no conflicts with older as
> common file, but I did get conflicts. Maybe we used different
> commands? My command was:
>
> cat YOURS | diff3 -E -am MINE OLDER -
>
> Below, I show one
> reasonable interpretation of the changes (although there are other
> reasonable interpretations). Your original files did not have any
> blank lines in it, but I have added blanks lines so I can show what I
> think diff considers to be similar lines. I made it so that similar
> liens are on the same horizontal level so it makes it it easy to make
> your eyes horizontally scan it. Note that I run diff3 on your
> original files with no blank lines. I only add blank lines here as a
> way to show how I think diff is matching things up:
>
> R means result of merge.
>
> M O Y R
> v v
> s s s s
> x x
> m1 m1 m1 m1
> m2 m2 m2 m2
> m1 m1
> x x
> m2 m2
> s s s s
> v v v v
> s s s s
> x
> <<<<<<< MINE
> m1 m1 m1
> x x x
> m2 m2 m2
> =======
> >>>>>>> -
> m1 m1 m1 m1
> m2 m2 m2 m2
> x x
> s s s s
> v v
That layout makes things clear thanks.
> I think it did something reasonable. Change M deleted 1 line with an
> "x" on it, and change Y deleted that same line plus the 3 lines just
> below. Those 3 lines are shown contained in the conflict brackets. I
> think it is not a burden to make a human manually look at that and
> decide what to do. And there is a good chance that deleting all 4
> lines is not the right thing to do. So therefore cvs should not just
> assume that is right. As long as you pick the right section of the
> conflict, it will work. Where as with some of my other test cases, the
> unpatched cvs has a conflict where there is obviously no conflict or
> it loses one person's changes with no hint to the user that it did so.
>
> So to summarize, I think you patch makes cvs handle this case
> reasonably. So far, I am satisfied with your patch the way it is.
Yes I agree it should be a conflict, and would be troubled if it wasn't.
> However, I am still worried that you and I get different results with
> the unpatched diff3. Perhaps that indicates that I am not testing
> some case I *should* be testing. So please let me know if I ran diff3
> wrong.
You did run diff3 correctly.
Sorry, I think I must've accidentally added that "x" that only exists
in O after I tested the files, because now I get the same results as you.
>
> BTW, I have not yet tried out your other cases in your other e-mails.
>
To check what I sent in
http://www.mail-archive.com/bug-cvs%40gnu.org/msg00814.html
I copied from the web site and pasted into new files
for configuration 3)
> /usr/local/bin/diff3 -E -am MINE MINE YOURS
v
s
<<<<<<< MINE
x
m
=======
>>>>>>> YOURS
m
<<<<<<< MINE
x
x
x
x
x
x
x
x
x
x
=======
>>>>>>> YOURS
s
s
s
s
s
s
s
s
s
s
v
> cat YOURS | /usr/local/bin/diff3 -E -am MINE MINE - | diff YOURS -
gives no output as expected.
For configuration 2)
> /usr/local/bin/diff3 -E -am MINE OLDER YOURS
v
s
<<<<<<< MINE
x
m
=======
>>>>>>> YOURS
m
<<<<<<< MINE
x
=======
>>>>>>> YOURS
s
v
s
<<<<<<< MINE
x
=======
>>>>>>> YOURS
m
<<<<<<< MINE
m
x
=======
>>>>>>> YOURS
s
v
> cat YOURS | /usr/local/bin/diff3 -E -am MINE OLDER -
v
s
m
s
v
s
m
s
v
For configuration 1) of
http://www.mail-archive.com/bug-cvs%40gnu.org/msg00803.html
I'm not happy with
> /usr/local/bin/diff3 -E -am MINE OLDER YOURS | diff MINE -
having no output
M O Y R=M
x x x x
s s s s
c a a c
b b
s s s s
b b b
s s s
y y y y
as it seems to easy to loose changes in Y.
I'm happier with
> cat YOURS | /usr/local/bin/diff3 -E -am MINE OLDER -
x
s
c
s
b
s
b
s
y
M O Y R
x x x x
s s s s
c c
s a a s
b b b b
s s s s
b b
s s
y y y y
and would even be happy with
M O Y R
x x x x
s s s s
<<<<<<< MINE
c c
s a a s
b
s
=======
c
s a a a
b b
s s
>>>>>>> YOURS
b b b b
s s s s
y y y y
- Re: Merging bug (wrong conflicts), (continued)
- Re: Merging bug (wrong conflicts), Karl Tomlinson, 2001/02/08
- Re: Merging bug (wrong conflicts), Jacob Burckhardt, 2001/02/08
- Re: Merging bug (wrong conflicts), Derek R. Price, 2001/02/16
- Re: Merging bug (wrong conflicts), Jacob Burckhardt, 2001/02/16
- Re: Merging bug (wrong conflicts), Derek R. Price, 2001/02/16
- Re: Merging bug (wrong conflicts), Karl Tomlinson, 2001/02/18
- Re: Merging bug (wrong conflicts), Karl Tomlinson, 2001/02/20
- Re: Merging bug (wrong conflicts), Karl Tomlinson, 2001/02/20
- Re: Merging bug (wrong conflicts), Karl Tomlinson, 2001/02/20
- Re: Merging bug (wrong conflicts), Jacob Burckhardt, 2001/02/21
- Re: Merging bug (wrong conflicts),
Karl Tomlinson <=