mergecmd: simplify conditional
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 17 Sep 2015 12:44:52 -0700
changeset 26302 5ba3358ebc7f
parent 26301 3f8c5c284c86
child 26303 c99b4d6efdd8
mergecmd: simplify conditional The previous if tested the same thing with 'if repo._activebookmark'. We make the if/else logic clearer before a bigger refactoring.
mercurial/commands.py
--- a/mercurial/commands.py	Thu Sep 17 10:59:52 2015 -0700
+++ b/mercurial/commands.py	Thu Sep 17 12:44:52 2015 -0700
@@ -4785,7 +4785,7 @@
                 "please merge with an explicit rev or bookmark"),
                 hint=_("run 'hg heads' to see all heads"))
 
-    if not node and not repo._activebookmark:
+    elif not node:
         branch = repo[None].branch()
         bheads = repo.branchheads(branch)
         nbhs = [bh for bh in bheads if not repo[bh].bookmarks()]