changeset 39200:bd63ada7e1f8 stable

phases: drop dead code in `newheads` There are new code earlier in the function achieving the same result. Spotted by Yuya Nishihara.
author Boris Feld <boris.feld@octobus.net>
date Sat, 18 Aug 2018 10:24:57 +0200
parents d8ac2ad55d9c
children 5b9f116104f9 d750a6c9248d
files mercurial/phases.py
diffstat 1 files changed, 0 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/phases.py	Sat Aug 18 10:24:16 2018 +0200
+++ b/mercurial/phases.py	Sat Aug 18 10:24:57 2018 +0200
@@ -678,8 +678,6 @@
     # The logic operated on revisions, convert arguments early for convenience
     new_heads = set(rev(n) for n in heads if n != nullid)
     roots = [rev(n) for n in roots]
-    if not heads or not roots:
-        return heads
     # compute the area we need to remove
     affected_zone = repo.revs("(%ld::%ld)", roots, new_heads)
     # heads in the area are no longer heads