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