[PATCH 1 of 6 V5] merge: add conflict marker formatter (BC)

Matt Harbison matt_harbison at yahoo.com
Fri May 16 22:48:16 CDT 2014


On Fri, 16 May 2014 23:53:34 +0000, Durham Goode wrote:

> On 5/16/14, 4:48 PM, "Durham Goode" <durham at fb.com> wrote:
> 
>># HG changeset patch
>># User Durham Goode <durham at fb.com>
>># Date 1399593022 25200
>>#      Thu May 08 16:50:22 2014 -0700
>># Node ID d2d3257218fddf9b672bc419bce5aade1ca86ec4
>># Parent  28414e5ac9ec6ec05253d19303dffd8b1d5ab93f
>>merge: add conflict marker formatter (BC)
>>
>>Adds a conflict marker formatter that can produce custom conflict marker
>>descriptions. It can be set via ui.mergemarkertemplate. The old behavior
>>can be used still by setting ui.mergemarkers=basic.
>>
>>The default format is similar to:
>>
>>  {node|short} {tag} {branch} {bookmarks} - {author}: "{desc|firstline}"
>>
>>And renders as:
>>
>>  contextblahblah
>>  <<<<<<< local: c7fdd7ce4652 - durham: "Fix broken stuff in my feature
>>branch"
>>  line from my changes
>>  =======
>>  line from the other changes
>>  >>>>>>> other: a3e55d7f4d38  master - sid0: "This is a commit to master
>>th...
>>  morecontextblahblah
> 
> V5 updates:
> - changes [merge] to [ui] for newly added config options
> - adds tests for both new config options
> - adds documentation for the new config options
> - adds additional documentation to the $local and $other merge tool
> documentation for clarity
> - moves the ‘hg update’ conflict marker change to the very end of the
> series. There seems to be some debate there, so the queuer can choose to
> leave that one off if it’s too controversial.
> 

I use a 3 way diff utility to resolve conflicts, so I don't feel too strongly
about the new label names purely as markers left in the file.  But I am
wondering if these will carry over into extdiff and THG for consistency.

Right now, it looks like extdiff on the command mentions "other" and "base"
as a label for each window when merging like so (with BeyondCompare3):

  c:\Users\Matt\Projects\hg\hgext\rebase.py
  c:\Users\Matt\AppData\Local\Temp\rebase.py~other.qrpowa
  c:\Users\Matt\AppData\Local\Temp\rebase.py~base.8j61hj

THG appends '[local]', '[merged]' and '[other]' to the window labels when
doing a 3way diff.

I typically read this as "local (cset)" and "other (cset)", so I'm not sure
why users are confused by this.  Is it that for operations which change the
working directory like update, they aren't clear if "local" is a reference
to the cset when starting the operation or where they end up?

If the names could be the same for {merge, update, rebase, graft}, it would
be a (slightly?) less steep learning curve for these operations.  I don't
have any other suggestions though.

--Matt



More information about the Mercurial-devel mailing list