[PATCH 2 of 3 ctx-cleanup] merge: wctx.rev() is never not None
Sean Farley
sean at farley.io
Wed May 31 20:22:07 EDT 2017
# HG changeset patch
# User Sean Farley <sean at farley.io>
# Date 1494536162 25200
# Thu May 11 13:56:02 2017 -0700
# Branch wctxds
# Node ID 6cdb17d89848a1bdb0fbcac24fe8c8322bb0bb02
# Parent 9879720e90cf13e445d17fc22f53c071a22322d9
merge: wctx.rev() is never not None
Based on Mads Kiilerix's suggestion that even for in-memory merge, this
logic will need to change. It's unused code from 8b846dbc57b6.
diff --git a/mercurial/merge.py b/mercurial/merge.py
index ae57a5f..2ebfae6 100644
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1067,13 +1067,12 @@ def calculateupdates(repo, wctx, mctx, a
del actions[f]
repo.ui.note(_('end of auction\n\n'))
_resolvetrivial(repo, wctx, mctx, ancestors[0], actions)
- if wctx.rev() is None:
- fractions = _forgetremoved(wctx, mctx, branchmerge)
- actions.update(fractions)
+ fractions = _forgetremoved(wctx, mctx, branchmerge)
+ actions.update(fractions)
return actions, diverge, renamedelete
def batchremove(repo, actions):
"""apply removes to the working directory
More information about the Mercurial-devel
mailing list