Patchwork [2,of,5] show: standardize format of available views text

login
register
mail settings
Submitter Ryan McElroy
Date April 10, 2017, 9:41 a.m.
Message ID <9397e5834ce19a95fbc6.1491817264@devbig314.prn1.facebook.com>
Download mbox | patch
Permalink /patch/20051/
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 9397e5834ce19a95fbc6a6bb1cf099ec3c00f8f3
# Parent  0f0217e8fb4dd63b15bb7b0294056d1c63ed0561
show: standardize format of available views text
Yuya Nishihara - April 11, 2017, 12:54 p.m.
On Mon, 10 Apr 2017 02:41:04 -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 9397e5834ce19a95fbc6a6bb1cf099ec3c00f8f3
> # Parent  0f0217e8fb4dd63b15bb7b0294056d1c63ed0561
> show: standardize format of available views text
> 
> diff --git a/hgext/show.py b/hgext/show.py
> --- a/hgext/show.py
> +++ b/hgext/show.py
> @@ -68,7 +68,7 @@ def show(ui, repo, view=None, template=N
>         Consumers wanting stable command output should specify a template via
>         ``-T/--template``.
>  
> -    List of available views:
> +    Available views:
>  
>      """
>      if ui.plain() and not template:
> @@ -81,7 +81,7 @@ def show(ui, repo, view=None, template=N
>          ui.pager('show')
>          # TODO consider using formatter here so available views can be
>          # rendered to custom format.
> -        ui.write(_('available views:\n'))
> +        ui.write(_('Available views:\n'))
>          ui.write('\n')

We generally use uncapitalized words in command output.

Patch

diff --git a/hgext/show.py b/hgext/show.py
--- a/hgext/show.py
+++ b/hgext/show.py
@@ -68,7 +68,7 @@  def show(ui, repo, view=None, template=N
        Consumers wanting stable command output should specify a template via
        ``-T/--template``.
 
-    List of available views:
+    Available views:
 
     """
     if ui.plain() and not template:
@@ -81,7 +81,7 @@  def show(ui, repo, view=None, template=N
         ui.pager('show')
         # TODO consider using formatter here so available views can be
         # rendered to custom format.
-        ui.write(_('available views:\n'))
+        ui.write(_('Available views:\n'))
         ui.write('\n')
 
         for name, func in sorted(views.items()):
diff --git a/tests/test-show.t b/tests/test-show.t
--- a/tests/test-show.t
+++ b/tests/test-show.t
@@ -8,7 +8,7 @@  No arguments shows available views
   $ hg init empty
   $ cd empty
   $ hg show
-  available views:
+  Available views:
   
   bookmarks -- bookmarks and their associated changeset
   
@@ -35,7 +35,7 @@  No arguments shows available views
          Consumers wanting stable command output should specify a template via
          "-T/--template".
   
-      List of available views:
+      Available views:
   
        bookmarks   bookmarks and their associated changeset