[PATCH evolve-ext] evolve: clarify code in _singlesuccessor

Laurent Charignon lcharignon at fb.com
Mon Jun 22 19:47:58 CDT 2015


# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1435020392 25200
#      Mon Jun 22 17:46:32 2015 -0700
# Node ID a6b72e1db6ff5743cdb7ada37ef7c9d206b683d1
# Parent  4198e2fad6ba08c0798c217e7b643fae9c28e81b
evolve: clarify code in _singlesuccessor

Before this patch we were not very explicit with this while condition in
_singlesuccessor. This patch makes it more legible.

diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -1364,7 +1364,7 @@ def _singlesuccessor(repo, p):
     ui = repo.ui
     newer = obsolete.successorssets(repo, obs.node())
     # search of a parent which is not killed
-    while not newer or newer == [()]:
+    while newer == []:
         ui.debug("stabilize target %s is plain dead,"
                  " trying to stabilize on its parent\n" %
                  obs)


More information about the Mercurial-devel mailing list