Thierry Volpiatto <[EMAIL PROTECTED]> writes:

> Toby Allsopp <[EMAIL PROTECTED]> writes:

> About merging from bookmarks with hg it's work with the hgmerge script, that's
> mean if hgmerge fail to merge, it' will call EDITOR to merge in one file, 
> what is
> a dangerous exercice.
> You have to use the script that is on mercurial site to merge with ediff.
> I hope Stefan have receive my recipe since i have no news.

The mentioned merge script can be found here:
http://www.selenic.com/mercurial/wiki/index.cgi/MergingWithEmacs

Here is the example provided by Thierry:

,----
| [EMAIL PROTECTED] ~/scratch-saves $ mkdir test1
| [EMAIL PROTECTED] ~/scratch-saves $ cd test1
| [EMAIL PROTECTED] ~/scratch-saves/test1 $ echo "hello" > testfile
| [EMAIL PROTECTED] ~/scratch-saves/test1 $ ls
| testfile
| [EMAIL PROTECTED] ~/scratch-saves/test1 $ hg init
| [EMAIL PROTECTED] ~/scratch-saves/test1 $ hg add testfile
| [EMAIL PROTECTED] ~/scratch-saves/test1 $ hg commit -m "testfile added" 
testfile
| [EMAIL PROTECTED] ~/scratch-saves/test1 $ cd ..
| [EMAIL PROTECTED] ~/scratch-saves $ hg clone test1 test2
| updating working directory
| 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
| [EMAIL PROTECTED] ~/scratch-saves $ cd test1
| [EMAIL PROTECTED] ~/scratch-saves/test1 $ echo "that's a second line" >> 
testfile 
| [EMAIL PROTECTED] ~/scratch-saves/test1 $ hg commit -m "add a new line in 
test1" testfile 
| [EMAIL PROTECTED] ~/scratch-saves/test1 $ cd ..
| [EMAIL PROTECTED] ~/scratch-saves $ cd test2
| [EMAIL PROTECTED] ~/scratch-saves/test2 $ echo "is that a second line?" >> 
testfile 
| [EMAIL PROTECTED] ~/scratch-saves/test2 $ hg commit -m "add a new line in 
test2 different from the one in test1" testfile 
| [EMAIL PROTECTED] ~/scratch-saves/test2 $ hg pull 
file:///home/thierry/scratch-saves/test1
| pulling from file:///home/thierry/scratch-saves/test1
| searching for changes
| adding changesets
| adding manifests
| adding file changes
| added 1 changesets with 1 changes to 1 files (+1 heads)
| (run 'hg heads' to see heads, 'hg merge' to merge)
`----

Now we must merge.


I experimented a bit with this scenario.

Mercurial calls a merge utility, when it encounters a conflict.
I found no apparent way to use a different solution.

I changed the merge script a bit to call emacsclient:

if emacsclient --eval "(ediff-merge-with-ancestor \"$BACKUP\" \"$OTHER\" 
\"$BASE\" nil \"$LOCAL\")"


This seems to work very well for me.

Thierry, does this solution have a drawback for you?


Stefan.

_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev

Reply via email to