##// END OF EJS Templates
check-code: find trailing whitespace
Martin Geisler -
r12770:614f0d87 default
parent child Browse files
Show More
@@ -110,6 +110,7 b' pypats = ['
110 (r'.{85}', "line too long"),
110 (r'.{85}', "line too long"),
111 (r'.{81}', "warning: line over 80 characters"),
111 (r'.{81}', "warning: line over 80 characters"),
112 (r'[^\n]\Z', "no trailing newline"),
112 (r'[^\n]\Z', "no trailing newline"),
113 (r'(\S\s+|^\s+)\n', "trailing whitespace"),
113 # (r'^\s+[^_ ][^_. ]+_[^_]+\s*=', "don't use underbars in identifiers"),
114 # (r'^\s+[^_ ][^_. ]+_[^_]+\s*=', "don't use underbars in identifiers"),
114 # (r'\w*[a-z][A-Z]\w*\s*=', "don't use camelcase in identifiers"),
115 # (r'\w*[a-z][A-Z]\w*\s*=', "don't use camelcase in identifiers"),
115 (r'^\s*(if|while|def|class|except|try)\s[^[]*:\s*[^\]#\s]+',
116 (r'^\s*(if|while|def|class|except|try)\s[^[]*:\s*[^\]#\s]+',
@@ -651,7 +651,7 b' class svn_source(converter_source):'
651 else:
651 else:
652 self.ui.debug('unknown path in revision %d: %s\n' % \
652 self.ui.debug('unknown path in revision %d: %s\n' % \
653 (revnum, path))
653 (revnum, path))
654 elif kind == svn.core.svn_node_dir:
654 elif kind == svn.core.svn_node_dir:
655 if ent.action == 'M':
655 if ent.action == 'M':
656 # If the directory just had a prop change,
656 # If the directory just had a prop change,
657 # then we shouldn't need to look for its children.
657 # then we shouldn't need to look for its children.
@@ -823,7 +823,7 b' class svn_source(converter_source):'
823 def getfile(self, file, rev):
823 def getfile(self, file, rev):
824 # TODO: ra.get_file transmits the whole file instead of diffs.
824 # TODO: ra.get_file transmits the whole file instead of diffs.
825 if file in self.removed:
825 if file in self.removed:
826 raise IOError()
826 raise IOError()
827 mode = ''
827 mode = ''
828 try:
828 try:
829 new_module, revnum = self.revsplit(rev)[1:]
829 new_module, revnum = self.revsplit(rev)[1:]
@@ -892,7 +892,7 b' class svn_source(converter_source):'
892 finally:
892 finally:
893 if module is not None:
893 if module is not None:
894 self.reparent(prevmodule)
894 self.reparent(prevmodule)
895
895
896 def _getlog(self, paths, start, end, limit=0, discover_changed_paths=True,
896 def _getlog(self, paths, start, end, limit=0, discover_changed_paths=True,
897 strict_node_history=False):
897 strict_node_history=False):
898 # Normalize path names, svn >= 1.5 only wants paths relative to
898 # Normalize path names, svn >= 1.5 only wants paths relative to
@@ -407,7 +407,7 b' def runcommand(lui, repo, cmd, fullargs,'
407
407
408 def _getlocal(ui, rpath):
408 def _getlocal(ui, rpath):
409 """Return (path, local ui object) for the given target path.
409 """Return (path, local ui object) for the given target path.
410
410
411 Takes paths in [cwd]/.hg/hgrc into account."
411 Takes paths in [cwd]/.hg/hgrc into account."
412 """
412 """
413 try:
413 try:
@@ -15,7 +15,7 b' def _getpreferredencoding():'
15 for Python 2.7 and up. This is the same corrected code for earlier
15 for Python 2.7 and up. This is the same corrected code for earlier
16 Python versions.
16 Python versions.
17
17
18 However, we can't use a version check for this method, as some distributions
18 However, we can't use a version check for this method, as some distributions
19 patch Python to fix this. Instead, we use it as a 'fixer' for the mac-roman
19 patch Python to fix this. Instead, we use it as a 'fixer' for the mac-roman
20 encoding, as it is unlikely that this encoding is the actually expected.
20 encoding, as it is unlikely that this encoding is the actually expected.
21 '''
21 '''
@@ -192,7 +192,7 b' def _abssource(repo, push=False, abort=T'
192 if repo.ui.config('paths', 'default'):
192 if repo.ui.config('paths', 'default'):
193 return repo.ui.config('paths', 'default')
193 return repo.ui.config('paths', 'default')
194 if abort:
194 if abort:
195 raise util.Abort(_("default path for subrepository %s not found") %
195 raise util.Abort(_("default path for subrepository %s not found") %
196 reporelpath(repo))
196 reporelpath(repo))
197
197
198 def itersubrepos(ctx1, ctx2):
198 def itersubrepos(ctx1, ctx2):
@@ -489,7 +489,7 b' class httphandler(keepalive.HTTPHandler)'
489 def _verifycert(cert, hostname):
489 def _verifycert(cert, hostname):
490 '''Verify that cert (in socket.getpeercert() format) matches hostname.
490 '''Verify that cert (in socket.getpeercert() format) matches hostname.
491 CRLs and subjectAltName are not handled.
491 CRLs and subjectAltName are not handled.
492
492
493 Returns error message if any problems are found and None on success.
493 Returns error message if any problems are found and None on success.
494 '''
494 '''
495 if not cert:
495 if not cert:
General Comments 0
You need to be logged in to leave comments. Login now