[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: cvs merging - conflict
RE: cvs merging - conflict
Thu, 17 Jun 2004 11:53:55 -0400
Thanks for the reply. Nice explanation of the differences. As for white
space, I'm not asking for the machine to blindly throw white space away, I'm
asking for the ability to tell the machine to throw away white space. It
doesn't even have to be the default, just an option.
In some cases, my merging appears to be related to the eol characters, but I
wrote an ant script that fixes the eol character and then I can remerge.
Technical Development Advisor
Amisys Synertech Inc.
"Confidentiality Notice: The information contained in this transmission is
confidential, proprietary, or privileged and may be subject to protection
under the Health Insurance Portability and Accountability Act of 1996 or
other legal sanction. The message is intended for the sole use of the
individual or entity to whom it is addressed. If you are not the intended
recipient, you are notified that any review, use, disclosure, distribution,
or copying of the message or its contents is strictly prohibited and may
subject you to criminal or civil penalty. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all copies
of the original message."
From: Kaz Kylheku [mailto:address@hidden Behalf Of Kaz Kylheku
Sent: Thursday, June 17, 2004 11:41 AM
To: Feldmann, Rick
Subject: Re: cvs merging - conflict
On Thu, 17 Jun 2004, Feldmann, Rick wrote:
> I read somewhere that cvs update uses diff to figure out modifications to
> the files.
The merging algorithm is based on the three-way merge program diff3.
> However, it doesn't appear to use the same diff as cvs diff -
That's correct. diff and diff3 are diff-erent animals.
> Part of it is the white space issue, and there doesn't appear to be and
> option in update to ignore white space.
That wouldn't make sense. Ignoring any differences would cause update
to become unreliable.
Suppose that developer A commits a bugfix in some programming language
where whitespace is significant. The bugfix changes a file in
whitespace only. Developer B runs cvs update, which decides that the
fix is not important and so doesn't incorporate it into his working
The machine can't blindly throw away information in the output when
computing a merged version. The output of a merge operation is a new
working copy which will eventually make it back to the repository.
Ignoring whitespace differences in the output of diff is okay, because
such diffs are just for human consumption; they don't serve as input
back into the machine. For instance, such diffs can't be trusted to be
useful as patches.
If in a C program I change #define x () to #define x(), then a patch
produced with diff -ub will miss that change! Consequently, someone
applying the patch won't get the correct bugfix.