Patchwork win32: copy-edit debugssl messages to match prevailing style

login
register
mail settings
Submitter Kevin Bullock
Date July 17, 2017, 6:23 p.m.
Message ID <dcd0c87ef9e443e612e3.1500315835@ingalls.local>
Download mbox | patch
Permalink /patch/22446/
State Accepted
Headers show

Comments

Kevin Bullock - July 17, 2017, 6:23 p.m.
# HG changeset patch
# User Kevin Bullock <kbullock+mercurial@ringworld.org>
# Date 1500315779 18000
#      Mon Jul 17 13:22:59 2017 -0500
# Node ID dcd0c87ef9e443e612e3b7eb4e1d7406df9549be
# Parent  9a2ee9591acc4d5f5ab6bbb7054cb62cb5f29a62
win32: copy-edit debugssl messages to match prevailing style
Jun Wu - July 17, 2017, 7:22 p.m.
Looks an easy win to me.

Excerpts from Kevin Bullock's message of 2017-07-17 13:23:55 -0500:
> # HG changeset patch
> # User Kevin Bullock <kbullock+mercurial@ringworld.org>
> # Date 1500315779 18000
> #      Mon Jul 17 13:22:59 2017 -0500
> # Node ID dcd0c87ef9e443e612e3b7eb4e1d7406df9549be
> # Parent  9a2ee9591acc4d5f5ab6bbb7054cb62cb5f29a62
> win32: copy-edit debugssl messages to match prevailing style
> 
> diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
> --- a/mercurial/debugcommands.py
> +++ b/mercurial/debugcommands.py
> @@ -2074,7 +2074,7 @@ def debugssl(ui, repo, source=None, **op
>      of the SSL error is likely another issue.
>      '''
>      if pycompat.osname != 'nt':
> -        raise error.Abort(_('Certificate chain building is only possible on '
> +        raise error.Abort(_('certificate chain building is only possible on '
>                              'Windows'))
>  
>      if not source:
> @@ -2092,7 +2092,7 @@ def debugssl(ui, repo, source=None, **op
>      elif url.scheme == 'ssh':
>          addr = (url.host, url.port or 22)
>      else:
> -        raise error.Abort(_("Only https and ssh connections are supported"))
> +        raise error.Abort(_("only https and ssh connections are supported"))
>  
>      from . import win32
>  
> @@ -2103,19 +2103,19 @@ def debugssl(ui, repo, source=None, **op
>          s.connect(addr)
>          cert = s.getpeercert(True)
>  
> -        ui.status(_('Checking the certificate chain for %s.\n') % url.host)
> +        ui.status(_('checking the certificate chain for %s\n') % url.host)
>  
>          complete = win32.checkcertificatechain(cert, build=False)
>  
>          if not complete:
> -            ui.status(_('The certificate chain is incomplete.  Updating... '))
> +            ui.status(_('certificate chain is incomplete, updating... '))
>  
>              if not win32.checkcertificatechain(cert):
> -                ui.status(_('Failed.\n'))
> +                ui.status(_('failed.\n'))
>              else:
> -                ui.status(_('Done.\n'))
> +                ui.status(_('done.\n'))
>          else:
> -            ui.status(_('The full certificate chain is available.\n'))
> +            ui.status(_('full certificate chain is available\n'))
>      finally:
>          s.close()
>
Augie Fackler - July 17, 2017, 8:07 p.m.
On Mon, Jul 17, 2017 at 12:22:45PM -0700, Jun Wu wrote:
> Looks an easy win to me.

queued, thanks

>
> Excerpts from Kevin Bullock's message of 2017-07-17 13:23:55 -0500:
> > # HG changeset patch
> > # User Kevin Bullock <kbullock+mercurial@ringworld.org>
> > # Date 1500315779 18000
> > #      Mon Jul 17 13:22:59 2017 -0500
> > # Node ID dcd0c87ef9e443e612e3b7eb4e1d7406df9549be
> > # Parent  9a2ee9591acc4d5f5ab6bbb7054cb62cb5f29a62
> > win32: copy-edit debugssl messages to match prevailing style
> >
> > diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
> > --- a/mercurial/debugcommands.py
> > +++ b/mercurial/debugcommands.py
> > @@ -2074,7 +2074,7 @@ def debugssl(ui, repo, source=None, **op
> >      of the SSL error is likely another issue.
> >      '''
> >      if pycompat.osname != 'nt':
> > -        raise error.Abort(_('Certificate chain building is only possible on '
> > +        raise error.Abort(_('certificate chain building is only possible on '
> >                              'Windows'))
> >
> >      if not source:
> > @@ -2092,7 +2092,7 @@ def debugssl(ui, repo, source=None, **op
> >      elif url.scheme == 'ssh':
> >          addr = (url.host, url.port or 22)
> >      else:
> > -        raise error.Abort(_("Only https and ssh connections are supported"))
> > +        raise error.Abort(_("only https and ssh connections are supported"))
> >
> >      from . import win32
> >
> > @@ -2103,19 +2103,19 @@ def debugssl(ui, repo, source=None, **op
> >          s.connect(addr)
> >          cert = s.getpeercert(True)
> >
> > -        ui.status(_('Checking the certificate chain for %s.\n') % url.host)
> > +        ui.status(_('checking the certificate chain for %s\n') % url.host)
> >
> >          complete = win32.checkcertificatechain(cert, build=False)
> >
> >          if not complete:
> > -            ui.status(_('The certificate chain is incomplete.  Updating... '))
> > +            ui.status(_('certificate chain is incomplete, updating... '))
> >
> >              if not win32.checkcertificatechain(cert):
> > -                ui.status(_('Failed.\n'))
> > +                ui.status(_('failed.\n'))
> >              else:
> > -                ui.status(_('Done.\n'))
> > +                ui.status(_('done.\n'))
> >          else:
> > -            ui.status(_('The full certificate chain is available.\n'))
> > +            ui.status(_('full certificate chain is available\n'))
> >      finally:
> >          s.close()
> >
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -2074,7 +2074,7 @@  def debugssl(ui, repo, source=None, **op
     of the SSL error is likely another issue.
     '''
     if pycompat.osname != 'nt':
-        raise error.Abort(_('Certificate chain building is only possible on '
+        raise error.Abort(_('certificate chain building is only possible on '
                             'Windows'))
 
     if not source:
@@ -2092,7 +2092,7 @@  def debugssl(ui, repo, source=None, **op
     elif url.scheme == 'ssh':
         addr = (url.host, url.port or 22)
     else:
-        raise error.Abort(_("Only https and ssh connections are supported"))
+        raise error.Abort(_("only https and ssh connections are supported"))
 
     from . import win32
 
@@ -2103,19 +2103,19 @@  def debugssl(ui, repo, source=None, **op
         s.connect(addr)
         cert = s.getpeercert(True)
 
-        ui.status(_('Checking the certificate chain for %s.\n') % url.host)
+        ui.status(_('checking the certificate chain for %s\n') % url.host)
 
         complete = win32.checkcertificatechain(cert, build=False)
 
         if not complete:
-            ui.status(_('The certificate chain is incomplete.  Updating... '))
+            ui.status(_('certificate chain is incomplete, updating... '))
 
             if not win32.checkcertificatechain(cert):
-                ui.status(_('Failed.\n'))
+                ui.status(_('failed.\n'))
             else:
-                ui.status(_('Done.\n'))
+                ui.status(_('done.\n'))
         else:
-            ui.status(_('The full certificate chain is available.\n'))
+            ui.status(_('full certificate chain is available\n'))
     finally:
         s.close()