# HG changeset patch # User Pierre-Yves David # Date 1442519092 25200 # Node ID 5ba3358ebc7fdd7718bcad44e4c574c06c388beb # Parent 3f8c5c284c86acd1cd480e20d4ec899179af28b1 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. diff -r 3f8c5c284c86 -r 5ba3358ebc7f 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()]