[Top][All Lists]

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

Re: diff-iculties

From: Kaz Kylheku
Subject: Re: diff-iculties
Date: Wed, 31 Oct 2001 20:07:58 GMT
User-agent: slrn/ (Linux)

In article <address@hidden>, Andy Baker wrote:
>I might be being more thick than usual today, 
>but shouldn't the following two examples 
>essentially produce the same result?...
>   cvs up -jrev1 -jrev2 file
>   cvs diff -rrev1 -rrev2 file >patch
>   patch file <patch

The patch program does not handle three-way merging. It tries to patch
the diff hunks into the source text; if it cannot figure out where a
hunk goes, it writes it into a .rej (reject) file. Unlike CVS, patch
doesn't have access to the ancestral version.

However, the CVS merge operation you are doing *is* quite similar to the
actions of the GNU diff3 utility (when that is invoked in a certain way).

Also note that you should make a context diff to maximize the chances
of patch working properly; if the file being patched is different from
the patch base, it needs the context lines to guess where the changes
need to be applied.

>This email (including attachments) is confidential.  If you have received

Then why is it going to a public mailing list and Usenet newsgroup? :)

reply via email to

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