Patchwork [5,of,5] githelp: lowercase the start of output messages for consistency

login
register
mail settings
Submitter Matt Harbison
Date May 22, 2018, 3:17 a.m.
Message ID <d6ecb77cc36283d5141c.1526959032@Envy>
Download mbox | patch
Permalink /patch/31804/
State Accepted
Headers show

Comments

Matt Harbison - May 22, 2018, 3:17 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1526958268 14400
#      Mon May 21 23:04:28 2018 -0400
# Node ID d6ecb77cc36283d5141cef8f87b014619322132a
# Parent  8e4cdc86c55f579eac9887bd2bd09a5867232d32
githelp: lowercase the start of output messages for consistency

I left 'Mercurial' as a proper name capitalized.
via Mercurial-devel - May 23, 2018, 6:39 a.m.
On Mon, May 21, 2018 at 8:17 PM Matt Harbison <mharbison72@gmail.com> wrote:

> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1526958268 14400
> #      Mon May 21 23:04:28 2018 -0400
> # Node ID d6ecb77cc36283d5141cef8f87b014619322132a
> # Parent  8e4cdc86c55f579eac9887bd2bd09a5867232d32
> githelp: lowercase the start of output messages for consistency
>
> I left 'Mercurial' as a proper name capitalized.
>
> diff --git a/hgext/githelp.py b/hgext/githelp.py
> --- a/hgext/githelp.py
> +++ b/hgext/githelp.py
> @@ -196,7 +196,7 @@ def apply(ui, repo, *args, **kwargs):
>      ui.status((bytes(cmd)), "\n")
>
>  def bisect(ui, repo, *args, **kwargs):
> -    ui.status(_("See 'hg help bisect' for how to use bisect.\n\n"))
> +    ui.status(_("see 'hg help bisect' for how to use bisect.\n\n"))
>

I think we usually also drop the trailing period.

Patch

diff --git a/hgext/githelp.py b/hgext/githelp.py
--- a/hgext/githelp.py
+++ b/hgext/githelp.py
@@ -196,7 +196,7 @@  def apply(ui, repo, *args, **kwargs):
     ui.status((bytes(cmd)), "\n")
 
 def bisect(ui, repo, *args, **kwargs):
-    ui.status(_("See 'hg help bisect' for how to use bisect.\n\n"))
+    ui.status(_("see 'hg help bisect' for how to use bisect.\n\n"))
 
 def blame(ui, repo, *args, **kwargs):
     cmdoptions = [
@@ -456,7 +456,7 @@  def commit(ui, repo, *args, **kwargs):
     ui.status((bytes(cmd)), "\n")
 
 def deprecated(ui, repo, *args, **kwargs):
-    ui.warn(_('This command has been deprecated in the git project, ' +
+    ui.warn(_('this command has been deprecated in the git project, ' +
         'thus isn\'t supported by this tool.\n\n'))
 
 def diff(ui, repo, *args, **kwargs):
@@ -656,8 +656,8 @@  def mergebase(ui, repo, *args, **kwargs)
     cmd = Command("log -T '{node}\\n' -r 'ancestor(%s,%s)'"
                   % (args[0], args[1]))
 
-    ui.status(_('NOTE: ancestors() is part of the revset language.\n'),
-              _("Learn more about revsets with 'hg help revsets'\n\n"))
+    ui.status(_('note: ancestors() is part of the revset language.\n'),
+              _("(learn more about revsets with 'hg help revsets')\n\n"))
     ui.status((bytes(cmd)), "\n")
 
 def mergetool(ui, repo, *args, **kwargs):
@@ -776,7 +776,7 @@  def rebase(ui, repo, *args, **kwargs):
             "\n\n"))
         cmd['-d'] = convert(opts.get('onto'))
         if len(args) < 2:
-            raise error.Abort(_("Expected format: git rebase --onto X Y Z"))
+            raise error.Abort(_("expected format: git rebase --onto X Y Z"))
         cmd['-s'] = "'::%s - ::%s'" % (convert(args[1]), convert(args[0]))
     else:
         if len(args) == 1:
@@ -815,10 +815,10 @@  def reset(ui, repo, *args, **kwargs):
     hard = opts.get('hard')
 
     if opts.get('mixed'):
-        ui.status(_('NOTE: --mixed has no meaning since Mercurial has no '
+        ui.status(_('note: --mixed has no meaning since Mercurial has no '
                     'staging area\n\n'))
     if opts.get('soft'):
-        ui.status(_('NOTE: --soft has no meaning since Mercurial has no '
+        ui.status(_('note: --soft has no meaning since Mercurial has no '
                     'staging area\n\n'))
 
     cmd = Command('update')
diff --git a/tests/test-githelp.t b/tests/test-githelp.t
--- a/tests/test-githelp.t
+++ b/tests/test-githelp.t
@@ -165,11 +165,11 @@  githelp for reset, checking ~ in git bec
   hg update .~3
 
   $ hg githelp -- reset --mixed HEAD
-  NOTE: --mixed has no meaning since Mercurial has no staging area
+  note: --mixed has no meaning since Mercurial has no staging area
   
   hg update .
   $ hg githelp -- reset --soft HEAD
-  NOTE: --soft has no meaning since Mercurial has no staging area
+  note: --soft has no meaning since Mercurial has no staging area
   
   hg update .
   $ hg githelp -- reset --hard HEAD
@@ -221,7 +221,7 @@  githelp for stash drop with name
 
 githelp for whatchanged should show deprecated message
   $ hg githelp -- whatchanged -p
-  This command has been deprecated in the git project, thus isn't supported by this tool.
+  this command has been deprecated in the git project, thus isn't supported by this tool.
   
 
 githelp for git branch -m renaming
@@ -259,8 +259,8 @@  githelp for apply with directory strip c
 git merge-base
   $ hg githelp -- git merge-base --is-ancestor
   ignoring unknown option --is-ancestor
-  NOTE: ancestors() is part of the revset language.
-  Learn more about revsets with 'hg help revsets'
+  note: ancestors() is part of the revset language.
+  (learn more about revsets with 'hg help revsets')
   
   hg log -T '{node}\n' -r 'ancestor(A,B)'