[PATCH 1 of 2 evolve-ext] evolve: fix error in builddependencies

Laurent Charignon lcharignon at fb.com
Mon Jun 22 20:04:42 UTC 2015


# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1435002092 25200
#      Mon Jun 22 12:41:32 2015 -0700
# Node ID 54da8990174e356c3e22b2034072eb74ee9987e9
# Parent  8794a4680bdd78fe9e452611797f9b018fc031df
evolve: fix error in builddependencies

When MultipleSuccessorsError was raised, we were still running the code below
to add the dependency if succ was not None from a previous iteration.
This bug was harmless because dependencies and rdependencies are sets but it
makes the code clearer this way.

diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -1353,6 +1353,7 @@ def builddependencies(repo, revs):
     for r in revs:
         dependencies[r] = set()
         for p in repo[r].parents():
+            succ = None
             try:
                 succ = _singlesuccessor(repo, p)
             except MultipleSuccessorsError, exc:


More information about the Mercurial-devel mailing list