Easymerge Extension
This extension is not distributed with Mercurial.
Author: Sébastien Pierre
Download site: http://www.ivy.fr/mercurial/easy/mercurial-easy-latest.tar.gz
Home page: http://www.ivy.fr/mercurial/easy
Works with: Mercurial 0.9.1, 0.9.3, 0.9.4, and not 0.9.5 (yet).
Overview
Easymerge is part of the Mercurial Easy and provides you with a command-line GUI when merging from Mercurial.
Easymerge makes it easy:
- To do pick which files you'd like to merge first
- To spot which changesets you are merging
- To undo/redo your resolution (easymerge keeps backup)
Easymerge supports various merge utilities, including gvimdiff, filemerge, meld, kdiff3.
You can see a screenshot of the interface here.
Configuration
Configure your .hgrc to enable the extension by adding following lines:
[extensions] # JUST POINT TO WHERE YOU UNPACKED THE MERCURIAL EASY EXTENSIONS merge = ~/Local/Mercurial-Easy/Sources/easyhg/easymerge.py
Usage Scenario
Start by doing this:
hg init repoa ; cd repoa echo 'slkdanlksdnas' > foo.txt hg add foo.txt ; hg commit cd .. ; hg clone repoa repob ; cd repob echo 'asdasdsaasd' >> foo.txt hg commit cd ../repoa echo 'eortietrete' >> foo.txt hg commit hg pull ../repob
You should now have
pulling from ../repob searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) abort: update spans branches, use 'hg merge' or 'hg update -C' to lose changes warning: changegroup hook exited with status 255 (run 'hg heads' to see heads, 'hg merge' to merge)
you can do
hg merge
If you have easymerge installed, you'll have
merging foo.txt Registering conflict Conflict 0:foo.txt [66% equivalent] base foo.txt.base-r0 current foo.txt.current-r2 other foo.txt.other-r1 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit)
and you can now type easymerge.py (to run the command line utility) and enjoy the nice interface that is captured here.