[PATCH 0 of 4] integrated hgmerge, for review

Steve Borho steve at borho.org
Mon Jan 7 21:20:33 UTC 2008


Hello,

  This patch series integrates a heavily modified version of the
standalone hgmerge.py into Mercurial itself.  It overrides the default
behavior of the merge command to use this new subsystem to perform the merge
when HGMERGE and ui.merge are not set.

  Hgmerge tries give Mercurial a sane default merge behavior without any
configuration, while allowing the user to easily extend it to fit their
needs.  Unconfigured, it uses the simplemerge module to perform
three-way merges.  If simplemerge finds conflicts, hgmerge searches for
an interactive merge tool and uses the first one it finds.  If none are
found, it leaves the conflict markers in place and warns the user.

  The detection of interactive tools is plug-in based, allowing the user
to override the search behavior, modify the stock plug-ins, and define
entirely new plug-ins for themselves.  The configuration is done by two
new hgrc sections.  In [hgmerge], the user can assign a default plugin
and per-file extension plugins.  In [hgmerge-plugins], the user can
modify stock plug-ins or define new ones.  See the enclosed hgrc(5) and
ReadMe.txt under mercurial/hgmerge for more details.

  Note that the last patch in this series contains a number of tests.
Those tests have an external dependency that needs to be removed so that
they can be integrated into the stock test suite.  I wanted to post this
to the list so that we (Arve Knudsen and I) can get feedback on the new
code.

Cheers,

--
Steve Borho


More information about the Mercurial-devel mailing list