# HG changeset patch # User Yuya Nishihara # Date 1528536364 -32400 # Node ID f9805627af1f28230c821840f50f07ced957e9ed # Parent d046bf37f1ba5b5cba2f54faf8d5facd974e101a fileset: sort debugfileset output Unlike revset, the order of fileset result doesn't matter since it's used as a matcher predicate. This stabilizes debugfileset output for upcoming changes. diff -r d046bf37f1ba -r f9805627af1f mercurial/debugcommands.py --- a/mercurial/debugcommands.py Sat Jun 09 18:00:26 2018 +0900 +++ b/mercurial/debugcommands.py Sat Jun 09 18:26:04 2018 +0900 @@ -884,7 +884,7 @@ tree = fileset.parse(expr) ui.note(fileset.prettyformat(tree), "\n") - for f in ctx.getfileset(expr): + for f in sorted(ctx.getfileset(expr)): ui.write("%s\n" % f) @command('debugformat', diff -r d046bf37f1ba -r f9805627af1f tests/test-fileset.t --- a/tests/test-fileset.t Sat Jun 09 18:00:26 2018 +0900 +++ b/tests/test-fileset.t Sat Jun 09 18:26:04 2018 +0900 @@ -169,8 +169,8 @@ R a2 ? c3 $ fileset -r0 'added() and revs("wdir()", modified() or removed() or unknown())' + a2 b2 - a2 $ fileset -r0 'added() or revs("wdir()", added())' a1 a2 @@ -192,9 +192,9 @@ bin $ fileset 'grep("b{1}")' + b1 b2 c1 - b1 $ fileset 'grep("missingparens(")' hg: parse error: invalid match pattern: (unbalanced parenthesis|missing \)).* (re) [255] @@ -403,21 +403,18 @@ dos mixed $ fileset 'eol(unix)' - mixed .hgsub .hgsubstate b1 b2 c1 + mixed $ fileset 'eol(mac)' mac Test safety of 'encoding' on removed files $ fileset 'encoding("ascii")' - dos - mac - mixed .hgsub .hgsubstate 1k @@ -427,6 +424,9 @@ b2link (symlink !) bin c1 + dos + mac + mixed Test detection of unintentional 'matchctx.existing()' invocation @@ -561,12 +561,12 @@ --------------------------------------- $ fileset "revs('0+4', added())" + .hgsub + .hgsubstate a1 a2 b1 b2 - .hgsub - .hgsubstate overlapping set