>>>> "Stephen" == Stephen J Turnbull
<stephen(a)xemacs.org> writes:
Uwe Brauer writes:
> So I wanted to merge version 1.4 with 1.5 and expected:
Hm. I would have expected you to get something identical to version
1.5. More on that below.
A merge is not an operation on two version; it is operation on two
patches to the same version, or equivalently, an operation on *three*
versions.
Right, I agree. Otherwise it would be patch and diff.
Normally the two versions that are apparently being merged are on
different branches, and the third version is usually computed as the
common ancestor:
B--C We want to merge C and E. So we trace back from C through
B,
/ and from E back through D, to A, the common ancestor. Then
A we take all hunks of the diff A->C that do not touch lines
\ touched by the diff A->E, and apply them to A. Similarly we
D--E take all hunks of the diff A->E that don't touch lines
touched by the diff A->C, and apply those to A. Finally, if
there are any hunks of diff A->C that touch lines touched by diff
A-> E,
those hunks are *conflicts*, and you must resolve those by
editing the file to get the desired result in the conflict hunks.
Let me try to elaborate this with an example and let us forget version
control.
Suppose the original file is
File1:
2 This is a test line.
Author 1 adds
File2:
1 This is an important fact.
2. This is a test line.
While author 2 adds
File3:
2. This is a test line
3. My text is better.
So merging file 2 and 3 (and in this case accepting the changes) should
lead to
1 This is an important fact.
2. This is a test line
3. My text is better.
So far so good: emerge does this and ediff (wordwise) as well.
Back now to version control.
Of course I could just use vc-version-other-window twice and run emerge
on these files, but that looks cumbersome.
So I want to use vc-merge somehow:
If I understand you correctly file2 and
file3 cannot be represented by version 1.2 and 1.3
but rather my branches. But which branches???
1.2.1 and 1.2.2 I presume
or
1.2.1 and 1.3.1?
Uwe
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta