[Updated] D11879: simplemerge: stop merging file flags
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Mon Dec 20 09:36:54 UTC 2021
Closed by commit rHG58a3be48ddd2: simplemerge: stop merging file flags (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/D11879?vs=31361&id=31546
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11879/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11879
AFFECTED FILES
mercurial/simplemerge.py
CHANGE DETAILS
diff --git a/mercurial/simplemerge.py b/mercurial/simplemerge.py
--- a/mercurial/simplemerge.py
+++ b/mercurial/simplemerge.py
@@ -19,12 +19,10 @@
from __future__ import absolute_import
from .i18n import _
-from .node import nullrev
from . import (
error,
mdiff,
pycompat,
- util,
)
from .utils import stringutil
@@ -424,12 +422,6 @@
return result
-def is_not_null(ctx):
- if not util.safehasattr(ctx, "node"):
- return False
- return ctx.rev() != nullrev
-
-
def _mergediff(m3, name_a, name_b, name_base):
lines = []
conflicts = False
@@ -546,21 +538,13 @@
)
conflicts = m3.conflicts and not mode == b'union'
- # merge flags if necessary
- flags = localctx.flags()
- localflags = set(pycompat.iterbytestr(flags))
- otherflags = set(pycompat.iterbytestr(otherctx.flags()))
- if is_not_null(basectx) and localflags != otherflags:
- baseflags = set(pycompat.iterbytestr(basectx.flags()))
- commonflags = localflags & otherflags
- addedflags = (localflags ^ otherflags) - baseflags
- flags = b''.join(sorted(commonflags | addedflags))
-
mergedtext = b''.join(lines)
if opts.get('print'):
ui.fout.write(mergedtext)
else:
- localctx.write(mergedtext, flags)
+ # localctx.flags() already has the merged flags (done in
+ # mergestate.resolve())
+ localctx.write(mergedtext, localctx.flags())
if conflicts:
return 1
To: martinvonz, #hg-reviewers, marmoute, Alphare
Cc: Alphare, marmoute, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20211220/70596a3e/attachment-0002.html>
More information about the Mercurial-patches
mailing list