hgmerge: remove obsoleted code, update docs

Martin Geisler mgeisler at mgeisler.net
Wed Jan 9 13:45:51 CST 2008


Steve Borho <steve at borho.org> writes:

> On Mon, 2008-01-07 at 18:10 -0600, Oliver Xymoron wrote:
>> On Mon, 2008-01-07 at 15:20 -0600, Steve Borho wrote:
>> > +  Example ~/.hgrc:
>> > +
>> > +    [hgmerge]
>> > +    default = kdiff3
>> > +    ext.html = myHtmlPlugin
>> > +    ext.lib = takemine
>> 
>> Extension-based is a little limited. The decode/encode filters can
>> take patterns. It's a bit odd to have a [merge] and an hgmerge
>> section, if we're making this core functionality.
>
> There isn't currently a merge section as far as I know, only ui.merge.
> But I have no problem naming the new section just [merge]. Using file
> patterns that would look like:
>
> [merge]
> default = kdiff3
> **.html = myHtmlPlugin
> **.lib = takelocal

Why not simply

  *.html = foo
  *.lib = bar

I think many users would know that "*.html" means "HTML files", but many
would not know that "**.html" means almost the same, except that "**"
also includes directory separators and thus acts recursively -- if that
is indeed what it does here?

If it seems too restrictive to match only the basename against the glob
patterns, then let people use an initial slash if they want to root
their pattern to the repository root.

That is the kind of user interface I would expect when configuring
things like this:

  [merge]
  /easy-directory/*.txt = easy-merge
  /hard-directory/*.txt = hard-merge
  *.png = fancy-gimp-merge
  * = supermerge

The first matching pattern should probably win, that is why I have
placed the "*" pattern last. A keyword like "default" is a bit strange
since I might create a file called "default" for which I want special
merge behavior. I don't know why, but some people might do that :-)

-- 
Martin Geisler

      Do your secure multi-party computations (SMPC) with VIFF,
              the Virtual Ideal Functionality Framework.
                     Download at http://viff.dk/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20080109/0015f562/attachment.pgp 


More information about the Mercurial-devel mailing list