Jerry James writes:
With CVS, we got automatic ChangeLog merging, which I liked.
No, we didn't get it in general. If changelog A was the ancestor of
B, then B replaces A without a conflict. Mercurial does the same.
Mercurial is just far more likely to cause a conflict because it makes
concurrent edits to the same place in a file an inevitable occurrance.
I don't get that, out of the box at least, with Mercurial. Is
there some way to set it up?
No. It's an inevitable consequence of concurrent development and the
fact that ChangeLogs are edited on every commit and always in the same
place.
The best that can be done is for you to pull before committing, but
obviously this interferes with feature branching.
I would like to avoid what I just went through. I pulled in the
latest changes, got a merge conflict on two ChangeLogs,
The big problem with ChangeLog conflicts is that diff doesn't grok
ChangeLogs and resyncs on whitespace, so you get this:
<<<<<<< Version A
0000-00-00 Name A <a(a)b.c>
=======
1111-11-11 Name B <d(a)e.f>
>>>>>> Version B
<<<<<<< Version A
* log line A
=======
* log line B
>>>>>> Version B
It's ugly, but actually very regular.
and then had to figure out how to use meld (the tool selected by
mercurial).
Don't trust Mercurial-selected tools. IME, they generally have nice
GUIs but cannot be trusted to be conservative about preserving
everything that they haven't been told to specifically edit.
I use a keyboard macro, something like
C-s <<<<<<< SPC C-a C-k C-k C-s C-s C-a
C-s ======== C-q C-j C-x C-x C-w
C-r ======== C-y
Then clean up all the "=======" (ISTR they mostly can be replaced by
empty lines) and ">>>>>>> Version B^J" (replace with
nothing) with M-%.
This could probably be made more robust and added to add-log.el as
something like `add-log-merge-conflicted-changelog'.
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta