[Top][All Lists]

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

Re: join not producing conflict

From: Derek Robert Price
Subject: Re: join not producing conflict
Date: Wed, 22 Oct 2003 11:06:10 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1

Hash: SHA1

Mark D. Baushke wrote:

| With the patch to remove the above block of code, there is different
|If the text is different in the file at the place where a merge would
|occur, the conflict markers are generated. I have added a test to join6
|for this case. (In real usage, this case may actually be useful in that
|it might help a user figure out if the current change they have in their
|version of the file conflicts with something that was just added by the
|last commit...)
|However, if the code was just the elimination of the code that was added
|during the patch, the
|   diff3 -E -am -L file -L rev1 -L rev2 file file.rev1 file.rev2
|will NOT generate conflict markers. I am unable to find any path
|thru the code that is able to generate such conflict markers.

This I think is as expected.  Effectively, the command you list above
works out to:

~    diff3 -E -am -L file -L rev1 -L rev2 file.rev1 file.rev1 file.rev2

Since the contents of file and file.rev1 are the same.  As far as diff3
is concerned, it did the right thing.  I'm not sure what the workaround
would be, nor am I sure one is necessary.  The requested change set,
which can be conceptualized as a patch, was (now) completely merged into
the local workspace.  In the case of `file', the merge happened to go

|I have included a revised patch which rewords the comment that I am
|leaving behind about the code that was removed. I have also added a test
|to add conflict markers and one to show code being removed.


|+      cp temp2.txt temp.txt
|+      dotest join6-10 "${testcvs} -q ci -m del temp.txt" \
|+"Checking in temp\.txt;
|+${CVSROOT_DIRNAME}/join6/temp.txt,v  <--  temp\.txt
|+new revision: 1\.3; previous revision: 1\.2
|+      dotest join6-11 "${testcvs} diff temp.txt" ""
|+      dotest join6-12 "cmp temp2.txt temp.txt" ""

Looks good, but why the last `cvs diff' and cmp?  These look like
truisms that should have already been tested for in a commit and/or diff
test - 1.  after a successful commit, of course the diff against the
base revision is empty, and 2. of course commit didn't change the
contents of temp.txt.


- --
~                *8^)

Email: address@hidden

Get CVS support at <http://ximbiot.com>!
- --
I will not sleep through my education.
I will not sleep through my education.
I will not sleep through my education...

~          - Bart Simpson on chalkboard, _The Simpsons_
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org


reply via email to

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