[PATCH 1 of 5] show: tweak plain abort language for clarity
Ryan McElroy
rm at fb.com
Mon Apr 10 09:41:03 UTC 2017
# HG changeset patch
# User Ryan McElroy <rmcelroy at fb.com>
# Date 1491585973 25200
# Fri Apr 07 10:26:13 2017 -0700
# Node ID 0f0217e8fb4dd63b15bb7b0294056d1c63ed0561
# Parent e0dc40530c5aa514feb6a09cf79ab6a3aa2ec331
show: tweak plain abort language for clarity
diff --git a/hgext/show.py b/hgext/show.py
--- a/hgext/show.py
+++ b/hgext/show.py
@@ -72,10 +72,8 @@ def show(ui, repo, view=None, template=N
"""
if ui.plain() and not template:
- raise error.Abort(_('"hg show" cannot be used in plain mode because '
- 'output is not stable'),
- hint=_('unset HGPLAIN and invoke with -T/--template '
- 'to control output'))
+ hint = _('invoke with -T/--template to control output format')
+ raise error.Abort(_('must specify a template in plain mode'), hint=hint)
views = showview._table
diff --git a/tests/test-show.t b/tests/test-show.t
--- a/tests/test-show.t
+++ b/tests/test-show.t
@@ -55,8 +55,8 @@ Unknown view prints error
HGPLAIN results in abort
$ HGPLAIN=1 hg show bookmarks
- abort: "hg show" cannot be used in plain mode because output is not stable
- (unset HGPLAIN and invoke with -T/--template to control output)
+ abort: must specify a template in plain mode
+ (invoke with -T/--template to control output format)
[255]
But not if a template is specified
More information about the Mercurial-devel
mailing list