From patchwork Mon Apr 10 09:41:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1,of,5] show: tweak plain abort language for clarity From: Ryan McElroy X-Patchwork-Id: 20047 Message-Id: <0f0217e8fb4dd63b15bb.1491817263@devbig314.prn1.facebook.com> To: Date: Mon, 10 Apr 2017 02:41:03 -0700 # HG changeset patch # User Ryan McElroy # 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