[PATCH 1 of 5 V2] merge: add conflict marker formatter

Durham Goode durham at fb.com
Tue May 13 01:30:26 UTC 2014


On 5/12/14, 7:28 AM, "Matt Mackall" <mpm at selenic.com> wrote:

>On Fri, 2014-05-09 at 19:48 -0700, Durham Goode wrote:
>> diff --git a/mercurial/templates/raw/conflictmarker.tmpl
>>b/mercurial/templates/raw/conflictmarker.tmpl
>> new file mode 100644
>> --- /dev/null
>> +++ b/mercurial/templates/raw/conflictmarker.tmpl
>> @@ -0,0 +1,1 @@
>> +{shortest(node)}{ifeq(tags, "tip", " ", " {tags}")}{if(bookmarks, "
>>{bookmarks}")}{ifeq(branch, "default", "", " {branch}")} {author|user} -
>>"{desc|firstline}"
>> \ No newline at end of file
>
>Sticking this in the web templates is a bit unfortunate. I'd frankly
>prefer to have this live only in the code until we figure out a way to
>expose it more generically.

V3 moves this in to code.

>
>I'm also a little concerned about using all the bells and whistles by
>default. No one outside of Facebook has seen shortest(node) come out of
>any Mercurial command yet, for instance, and people just getting started
>are liable to be confused by the tiny hex string that results. I think
>something that shows commit/branch?/bookmark?/author is sufficient.

V3 gets rid of shortest and redoes the template a little.  I still have
the truncated first line of the commit message in there, since I think
it¹s important.

>
>Lastly, there's no apparent way to switch back to completely stock
>behavior because empty strings everywhere will still give "<<<<<< local:
>". Hopefully no one has tools that are picky about these markers.

V3 adds a merge.oldconflictmarkers=True option for doing this.




More information about the Mercurial-devel mailing list