[PATCH] sshpeer: move docstring to top
Augie Fackler
raf at durin42.com
Wed Dec 20 03:31:08 UTC 2017
> On Dec 19, 2017, at 09:37, Yuya Nishihara <yuya at tcha.org> wrote:
>
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1513599353 -32400
> # Mon Dec 18 21:15:53 2017 +0900
> # Node ID c836f3fd99ec97b248434e1523c73d77066c1d43
> # Parent 44fd4cfc6c0ad3107cacad10c76ed38bd74948f4
> sshpeer: move docstring to top
hah, queued, thanks
> Also makes it use double quotes consistently.
>
> diff --git a/mercurial/sshpeer.py b/mercurial/sshpeer.py
> --- a/mercurial/sshpeer.py
> +++ b/mercurial/sshpeer.py
> @@ -18,9 +18,9 @@ from . import (
> )
>
> def _serverquote(s):
> + """quote a string for the remote shell ... which we assume is sh"""
> if not s:
> return s
> - '''quote a string for the remote shell ... which we assume is sh'''
> if re.match('[a-zA-Z0-9@%_+=:,./-]*$', s):
> return s
> return "'%s'" % s.replace("'", "'\\''")
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list