Patchwork [1,of,5] show: tweak plain abort language for clarity

login
register
mail settings
Submitter Ryan McElroy
Date April 10, 2017, 9:41 a.m.
Message ID <0f0217e8fb4dd63b15bb.1491817263@devbig314.prn1.facebook.com>
Download mbox | patch
Permalink /patch/20047/
State Accepted
Headers show

Comments

Ryan McElroy - April 10, 2017, 9:41 a.m.
# HG changeset patch
# User Ryan McElroy <rmcelroy@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
Yuya Nishihara - April 11, 2017, 12:52 p.m.
On Mon, 10 Apr 2017 02:41:03 -0700, Ryan McElroy wrote:
> # HG changeset patch
> # User Ryan McElroy <rmcelroy@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

Queued this, thanks.

Patch

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