[PATCH 1 of 5 V3] merge: add conflict marker formatter (BC)
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Tue May 13 03:34:22 CDT 2014
On 05/12/2014 05:47 PM, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1399593022 25200
> # Thu May 08 16:50:22 2014 -0700
> # Node ID 09732bdb2784d9402e278c36406819a98919c2ca
> # Parent 697fba94dec9f192bd1fa877e2a98e3d10042fc6
> merge: add conflict marker formatter (BC)
>
> Adds a conflict marker formatter that can produce custom conflict marker
> descriptions. It can be set via merge.conflictmarkertemplate. The old behavior
> can be used still by setting merge.oldconflictmarkers=True.
1. Do not use "old" this will put the one doing the next update to this
topic in trouble.
Wouldn't that make more sense to have a it as:
[merge-tools]
internal:merge.conflictmarkers = simplest
>
> 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
>
> diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
> --- a/mercurial/filemerge.py
> +++ b/mercurial/filemerge.py
> @@ -7,7 +7,7 @@
>
> from node import short
> from i18n import _
> -import util, simplemerge, match, error
> +import util, simplemerge, match, error, templater, templatekw
> import os, tempfile, re, filecmp
>
> def _toolstr(ui, tool, part, default=""):
> @@ -269,6 +269,53 @@
> return True, r
> return False, 0
>
> +def _formatconflictmarker(repo, ctx, template, label, pad):
This function could use a docstring.
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list