Patchwork [11,of,11] phases: make order of debug output 'removing unknown node' deterministic

login
register
mail settings
Submitter Mads Kiilerich
Date Feb. 20, 2014, 1:43 a.m.
Message ID <8910254d3b4a30120f5b.1392860615@localhost.localdomain>
Download mbox | patch
Permalink /patch/3717/
State Accepted
Commit 1716a2671ec77fe95ee788e2dbf33876fba63bf5
Headers show

Comments

Mads Kiilerich - Feb. 20, 2014, 1:43 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1392860597 -3600
#      Thu Feb 20 02:43:17 2014 +0100
# Node ID 8910254d3b4a30120f5b7b319ed355fea1af020c
# Parent  0c08463662aa82753923bb49575e6b9379dc9213
phases: make order of debug output 'removing unknown node' deterministic
Matt Mackall - Feb. 24, 2014, 9:06 p.m.
On Thu, 2014-02-20 at 02:43 +0100, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski@unity3d.com>
> # Date 1392860597 -3600
> #      Thu Feb 20 02:43:17 2014 +0100
> # Node ID 8910254d3b4a30120f5b7b319ed355fea1af020c
> # Parent  0c08463662aa82753923bb49575e6b9379dc9213
> phases: make order of debug output 'removing unknown node' deterministic

I've queued 1-8 and 11, thanks.

There seems to be some discussion about 9, and 10 seems to depend on it.
I tend to agree that we want to keep the shelve date as is.

Patch

diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -258,7 +258,7 @@  class phasecache(object):
         filtered = False
         nodemap = repo.changelog.nodemap # to filter unknown nodes
         for phase, nodes in enumerate(self.phaseroots):
-            missing = [node for node in nodes if node not in nodemap]
+            missing = sorted(node for node in nodes if node not in nodemap)
             if missing:
                 for mnode in missing:
                     repo.ui.debug(