[Updated] D12015: filemerge: set default labels a little earlier
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Mon Jan 24 17:30:33 UTC 2022
Closed by commit rHGa809f1465a76: filemerge: set default labels a little earlier (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D12015?vs=31715&id=31828
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D12015/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D12015
AFFECTED FILES
mercurial/filemerge.py
CHANGE DETAILS
diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -535,8 +535,6 @@
files. It will fail if there are any conflicts and leave markers in
the partially merged file. Marker will have three sections, one from each
side of the merge and one for the base content."""
- if not labels:
- labels = _defaultconflictlabels
if len(labels) < 3:
labels.append(b'base')
return _merge(repo, fcd, fco, fca, labels, b'merge3')
@@ -577,8 +575,6 @@
the partially merged file. The marker will have two sections, one with the
content from one side of the merge, and one with a diff from the base
content to the content on the other side. (experimental)"""
- if not labels:
- labels = _defaultconflictlabels
if len(labels) < 3:
labels.append(b'base')
return _merge(repo, fcd, fco, fca, labels, b'mergediff')
@@ -841,9 +837,6 @@
return stringutil.ellipsis(mark, 80 - 8)
-_defaultconflictlabels = [b'local', b'other']
-
-
def _formatlabels(repo, fcd, fco, fca, labels, tool=None):
"""Formats the given labels using the conflict marker template.
@@ -1068,6 +1061,8 @@
toolconf = tool, toolpath, binary, symlink, scriptfn
+ if not labels:
+ labels = [b'local', b'other']
if mergetype == nomerge:
return func(repo, mynode, fcd, fco, fca, toolconf, labels)
@@ -1099,8 +1094,6 @@
else:
markerstyle = internalmarkerstyle
- if not labels:
- labels = _defaultconflictlabels
formattedlabels = labels
if markerstyle != b'basic':
formattedlabels = _formatlabels(
To: martinvonz, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220124/29d74375/attachment-0002.html>
More information about the Mercurial-patches
mailing list