[Updated] D12153: mergestate: use an early return for trivial merges
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Tue Feb 15 12:57:11 UTC 2022
Closed by commit rHGd169e651066b: mergestate: use an early return for trivial merges (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/D12153?vs=32102&id=32196
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D12153/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D12153
AFFECTED FILES
mercurial/mergestate.py
CHANGE DETAILS
diff --git a/mercurial/mergestate.py b/mercurial/mergestate.py
--- a/mercurial/mergestate.py
+++ b/mercurial/mergestate.py
@@ -434,8 +434,11 @@
if merge_ret is None:
# If return value of merge is None, then there are no real conflict
del self._state[dfile]
+ self._results[dfile] = None, None
self._dirty = True
- elif not merge_ret:
+ return None
+
+ if not merge_ret:
self.mark(dfile, MERGE_RECORD_RESOLVED)
action = None
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/20220215/6f9ab35e/attachment-0002.html>
More information about the Mercurial-patches
mailing list