[PATCH] sshpeer: move docstring to top
Yuya Nishihara
yuya at tcha.org
Tue Dec 19 14:37:18 UTC 2017
# 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
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("'", "'\\''")
More information about the Mercurial-devel
mailing list