# HG changeset patch # User FUJIWARA Katsunori # Date 2016-02-24 14:00:32 # Node ID 2c29f157463e0499fb5ad8b18b8f2f71e0037517 # Parent 9da2283d0c56d1ae68826fb1c9880599f4ccfef3 destutil: remove redundant examination Before this patch, "len(heads) != len(otherheads)" is examined to detect whether message should be displayed or not. But if "repo.revs('%ln and parents()', heads)", heads should contain "parents()" and otherheads is always less than heads. diff --git a/mercurial/destutil.py b/mercurial/destutil.py --- a/mercurial/destutil.py +++ b/mercurial/destutil.py @@ -357,11 +357,10 @@ def _statusotherbook(ui, repo): def _statusotherbranchheads(ui, repo): currentbranch = repo.dirstate.branch() heads = repo.branchheads(currentbranch) - l = len(heads) if repo.revs('%ln and parents()', heads): # we are on a head otherheads = repo.revs('%ln - parents()', heads) - if otherheads and l != len(otherheads): + if otherheads: ui.status(_('%i other heads for branch "%s"\n') % (len(otherheads), currentbranch))