commands: check for modheads being None
Python 2 allows the > operator to be used with a None and an
int. Python 3 does not. So we need to ensure the value isn't None
before comparing with >.
Differential Revision: https://phab.mercurial-scm.org/D5702
--- a/mercurial/commands.py Fri Jan 25 15:21:56 2019 -0800
+++ b/mercurial/commands.py Fri Jan 25 15:31:07 2019 -0800
@@ -4362,7 +4362,7 @@
msg = _("not updating: %s") % stringutil.forcebytestr(inst)
hint = inst.hint
raise error.UpdateAbort(msg, hint=hint)
- if modheads > 1:
+ if modheads is not None and modheads > 1:
currentbranchheads = len(repo.branchheads())
if currentbranchheads == modheads:
ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n"))