Patchwork [4,of,5] debugmergestate: sort extras before printing

login
register
mail settings
Submitter Pulkit Goyal
Date Sept. 11, 2020, 7:05 a.m.
Message ID <8abe98dc3e3c020566d6.1599807932@workspace>
Download mbox | patch
Permalink /patch/47134/
State Accepted
Headers show

Comments

Pulkit Goyal - Sept. 11, 2020, 7:05 a.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1599124516 -19800
#      Thu Sep 03 14:45:16 2020 +0530
# Node ID 8abe98dc3e3c020566d64ac3f3b802de2751d55f
# Parent  4e5bb80a831d8201e3407cf78721b8d2d236b74d
# EXP-Topic merge-newnode
debugmergestate: sort extras before printing

Prevents flaky output.

Differential Revision: https://phab.mercurial-scm.org/D8986

Patch

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -2062,7 +2062,7 @@  def debugmergestate(ui, repo, *args, **o
                 fm_files.data(renamed_path=state[1])
                 fm_files.data(rename_side=state[2])
             fm_extras = fm_files.nested(b'extras')
-            for k, v in ms.extras(f).items():
+            for k, v in sorted(ms.extras(f).items()):
                 fm_extras.startitem()
                 fm_extras.data(key=k)
                 fm_extras.data(value=v)