changeset 18959:2f6418d8a4c9

check-code: catch trailing space in comments
author Mads Kiilerich <madski@unity3d.com>
date Mon, 15 Apr 2013 01:37:23 +0200
parents c3b920980f22
children 170fc0949fb6
files contrib/check-code.py mercurial/pure/osutil.py mercurial/win32.py
diffstat 3 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Mon Apr 15 01:37:23 2013 +0200
+++ b/contrib/check-code.py	Mon Apr 15 01:37:23 2013 +0200
@@ -19,7 +19,8 @@
 def reppython(m):
     comment = m.group('comment')
     if comment:
-        return "#" * len(comment)
+        l = len(comment.rstrip())
+        return "#" * l + comment[l:]
     return repquote(m)
 
 def repcomment(m):
--- a/mercurial/pure/osutil.py	Mon Apr 15 01:37:23 2013 +0200
+++ b/mercurial/pure/osutil.py	Mon Apr 15 01:37:23 2013 +0200
@@ -68,7 +68,7 @@
 
     _INVALID_HANDLE_VALUE = _HANDLE(-1).value
 
-    # CreateFile 
+    # CreateFile
     _FILE_SHARE_READ = 0x00000001
     _FILE_SHARE_WRITE = 0x00000002
     _FILE_SHARE_DELETE = 0x00000004
--- a/mercurial/win32.py	Mon Apr 15 01:37:23 2013 +0200
+++ b/mercurial/win32.py	Mon Apr 15 01:37:23 2013 +0200
@@ -52,7 +52,7 @@
                 ('nFileIndexHigh', _DWORD),
                 ('nFileIndexLow', _DWORD)]
 
-# CreateFile 
+# CreateFile
 _FILE_SHARE_READ = 0x00000001
 _FILE_SHARE_WRITE = 0x00000002
 _FILE_SHARE_DELETE = 0x00000004