changeset 17428:72803c8edaa4

avoid using abbreviations that look like spelling errors
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 27 Aug 2012 23:14:27 +0200
parents 57c6c24b9bc4
children 72fa4ef2245f
files contrib/check-code.py hgext/win32mbcs.py hgext/zeroconf/Zeroconf.py mercurial/hook.py mercurial/httpclient/__init__.py mercurial/httpconnection.py mercurial/mail.py mercurial/manifest.py mercurial/url.py mercurial/win32.py tests/test-check-code.t
diffstat 11 files changed, 15 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Tue Aug 21 02:41:20 2012 +0200
+++ b/contrib/check-code.py	Mon Aug 27 23:14:27 2012 +0200
@@ -136,7 +136,7 @@
     (r'\w[+/*\-<>]\w', "missing whitespace in expression"),
     (r'^\s+\w+=\w+[^,)\n]$', "missing whitespace in assignment"),
     (r'(\s+)try:\n((?:\n|\1\s.*\n)+?)\1except.*?:\n'
-     r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Py2.4'),
+     r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Python 2.4'),
     (r'.{81}', "line too long"),
     (r' x+[xo][\'"]\n\s+[\'"]x', 'string join across lines with no space'),
     (r'[^\n]\Z', "no trailing newline"),
@@ -190,8 +190,8 @@
      'hasattr(foo, bar) is broken, use util.safehasattr(foo, bar) instead'),
     (r'opener\([^)]*\).read\(',
      "use opener.read() instead"),
-    (r'BaseException', 'not in Py2.4, use Exception'),
-    (r'os\.path\.relpath', 'os.path.relpath is not in Py2.5'),
+    (r'BaseException', 'not in Python 2.4, use Exception'),
+    (r'os\.path\.relpath', 'os.path.relpath is not in Python 2.5'),
     (r'opener\([^)]*\).write\(',
      "use opener.write() instead"),
     (r'[\s\(](open|file)\([^)]*\)\.read\(',
--- a/hgext/win32mbcs.py	Tue Aug 21 02:41:20 2012 +0200
+++ b/hgext/win32mbcs.py	Mon Aug 27 23:14:27 2012 +0200
@@ -119,7 +119,7 @@
     def f(*args, **kwds):
         return wrapper(func, args, kwds)
     try:
-        f.__name__ = func.__name__                # fail with python23
+        f.__name__ = func.__name__ # fails with Python 2.3
     except Exception:
         pass
     setattr(module, name, f)
--- a/hgext/zeroconf/Zeroconf.py	Tue Aug 21 02:41:20 2012 +0200
+++ b/hgext/zeroconf/Zeroconf.py	Mon Aug 27 23:14:27 2012 +0200
@@ -1272,8 +1272,7 @@
 			self.socket.bind(self.group)
 		except Exception:
 			# Some versions of linux raise an exception even though
-			# the SO_REUSE* options have been set, so ignore it
-			#
+			# SO_REUSEADDR and SO_REUSEPORT have been set, so ignore it
 			pass
 		self.socket.setsockopt(socket.SOL_IP, socket.IP_ADD_MEMBERSHIP, socket.inet_aton(_MDNS_ADDR) + socket.inet_aton('0.0.0.0'))
 
--- a/mercurial/hook.py	Tue Aug 21 02:41:20 2012 +0200
+++ b/mercurial/hook.py	Mon Aug 27 23:14:27 2012 +0200
@@ -154,7 +154,7 @@
                 oldstdout = os.dup(stdoutno)
                 os.dup2(stderrno, stdoutno)
         except AttributeError:
-            # __stdout/err__ doesn't have fileno(), it's not a real file
+            # __stdout__/__stderr__ doesn't have fileno(), it's not a real file
             pass
 
     try:
--- a/mercurial/httpclient/__init__.py	Tue Aug 21 02:41:20 2012 +0200
+++ b/mercurial/httpclient/__init__.py	Mon Aug 27 23:14:27 2012 +0200
@@ -170,7 +170,7 @@
         except socket.sslerror, e:
             if e.args[0] != socket.SSL_ERROR_WANT_READ:
                 raise
-            logger.debug('SSL_WANT_READ in _select, should retry later')
+            logger.debug('SSL_ERROR_WANT_READ in _select, should retry later')
             return True
         logger.debug('response read %d data during _select', len(data))
         # If the socket was readable and no data was read, that means
@@ -532,7 +532,7 @@
                         if e.args[0] != socket.SSL_ERROR_WANT_READ:
                             raise
                         logger.debug(
-                            'SSL_WANT_READ while sending data, retrying...')
+                            'SSL_ERROR_WANT_READ while sending data, retrying...')
                         continue
                     if not data:
                         logger.info('socket appears closed in read')
--- a/mercurial/httpconnection.py	Tue Aug 21 02:41:20 2012 +0200
+++ b/mercurial/httpconnection.py	Mon Aug 27 23:14:27 2012 +0200
@@ -73,7 +73,7 @@
     if '://' in uri:
         scheme, hostpath = uri.split('://', 1)
     else:
-        # py2.4.1 doesn't provide the full URI
+        # Python 2.4.1 doesn't provide the full URI
         scheme, hostpath = 'http', uri
     bestuser = None
     bestlen = 0
--- a/mercurial/mail.py	Tue Aug 21 02:41:20 2012 +0200
+++ b/mercurial/mail.py	Mon Aug 27 23:14:27 2012 +0200
@@ -13,7 +13,7 @@
 _oldheaderinit = email.Header.Header.__init__
 def _unifiedheaderinit(self, *args, **kw):
     """
-    Python2.7 introduces a backwards incompatible change
+    Python 2.7 introduces a backwards incompatible change
     (Python issue1974, r70772) in email.Generator.Generator code:
     pre-2.7 code passed "continuation_ws='\t'" to the Header
     constructor, and 2.7 removed this parameter.
--- a/mercurial/manifest.py	Tue Aug 21 02:41:20 2012 +0200
+++ b/mercurial/manifest.py	Mon Aug 27 23:14:27 2012 +0200
@@ -154,7 +154,7 @@
             # combine the changed lists into one list for sorting
             work = [(x, False) for x in added]
             work.extend((x, True) for x in removed)
-            # this could use heapq.merge() (from python2.6+) or equivalent
+            # this could use heapq.merge() (from Python 2.6+) or equivalent
             # since the lists are already sorted
             work.sort()
 
--- a/mercurial/url.py	Tue Aug 21 02:41:20 2012 +0200
+++ b/mercurial/url.py	Mon Aug 27 23:14:27 2012 +0200
@@ -278,7 +278,8 @@
     res.will_close = res._check_close()
 
     # do we have a Content-Length?
-    # NOTE: RFC 2616, S4.4, #3 says we ignore this if tr_enc is "chunked"
+    # NOTE: RFC 2616, section 4.4, #3 says we ignore this if
+    # transfer-encoding is "chunked"
     length = res.msg.getheader('content-length')
     if length and not res.chunked:
         try:
--- a/mercurial/win32.py	Tue Aug 21 02:41:20 2012 +0200
+++ b/mercurial/win32.py	Mon Aug 27 23:14:27 2012 +0200
@@ -328,7 +328,7 @@
     env += '\0'
 
     args = subprocess.list2cmdline(args)
-    # Not running the command in shell mode makes python26 hang when
+    # Not running the command in shell mode makes Python 2.6 hang when
     # writing to hgweb output socket.
     comspec = os.environ.get("COMSPEC", "cmd.exe")
     args = comspec + " /c " + args
--- a/tests/test-check-code.t	Tue Aug 21 02:41:20 2012 +0200
+++ b/tests/test-check-code.t	Mon Aug 27 23:14:27 2012 +0200
@@ -83,7 +83,7 @@
    any/all/format not available in Python 2.4
   ./non-py24.py:11:
    >     try:
-   no try/except/finally in Py2.4
+   no try/except/finally in Python 2.4
   ./classstyle.py:4:
    > class oldstyle_class:
    old-style class, use class foo(object)