diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -402,7 +402,7 @@ def stylelist(): split = file.split(".") if split[0] == "map-cmdline": stylelist.append(split[1]) - return ", ".join(stylelist) + return ", ".join(sorted(stylelist)) class templater(object): diff --git a/tests/test-command-template.t b/tests/test-command-template.t --- a/tests/test-command-template.t +++ b/tests/test-command-template.t @@ -458,7 +458,8 @@ Error if style not readable: Error if no style: $ hg log --style notexist - abort: style not found: notexist + abort: style 'notexist' not found + (available styles: bisect, changelog, compact, default, phases, xml) [255] Error if style missing key: diff --git a/tests/test-log.t b/tests/test-log.t --- a/tests/test-log.t +++ b/tests/test-log.t @@ -88,7 +88,7 @@ log on directory $ hg log -f -l1 --style something abort: style 'something' not found - (available styles: changelog, bisect, default, xml, phases, compact) + (available styles: bisect, changelog, compact, default, phases, xml) [255] -f, phases style