[PATCH] debugdag: stop wrongly sorting parents

Henrik Stuart hg at hstuart.dk
Sat Aug 30 05:40:34 CDT 2014


# HG changeset patch
# User Henrik Stuart <hg at hstuart.dk>
# Date 1409392593 -7200
#      Sat Aug 30 11:56:33 2014 +0200
# Node ID ff70ce70f88279323c7f4904c6b2f73a61aed0c0
# Parent  bdc0e04df243d3995c7266bf7d138fddd0449ba6
debugdag: stop wrongly sorting parents

The dag being dumped is not in a format that allows us to reconstruct the
original dag as the parent revisions are normalised.

diff -r bdc0e04df243 -r ff70ce70f882 mercurial/commands.py
--- a/mercurial/commands.py	Wed Aug 27 18:35:34 2014 +0200
+++ b/mercurial/commands.py	Sat Aug 30 11:56:33 2014 +0200
@@ -1905,8 +1905,8 @@
         revs = set((int(r) for r in revs))
         def events():
             for r in rlog:
-                yield 'n', (r, list(set(p for p in rlog.parentrevs(r)
-                                        if p != -1)))
+                yield 'n', (r, list(p for p in rlog.parentrevs(r)
+                                        if p != -1))
                 if r in revs:
                     yield 'l', (r, "r%i" % r)
     elif repo:
@@ -1925,8 +1925,8 @@
                     if newb != b:
                         yield 'a', newb
                         b = newb
-                yield 'n', (r, list(set(p for p in cl.parentrevs(r)
-                                        if p != -1)))
+                yield 'n', (r, list(p for p in cl.parentrevs(r)
+                                        if p != -1))
                 if tags:
                     ls = labels.get(r)
                     if ls:


More information about the Mercurial-devel mailing list