Whitespace/Tab cleanup
authorThomas Arendsen Hein <thomas@intevation.de>
Sun, 01 Oct 2006 19:26:33 +0200
changeset 3223 53e843840349
parent 3222 a5603ad915c5
child 3224 5b7ed414affb
Whitespace/Tab cleanup
contrib/churn.py
hgext/fetch.py
hgext/mq.py
mercurial/commands.py
mercurial/context.py
mercurial/dirstate.py
mercurial/hgweb/hgwebdir_mod.py
mercurial/httprepo.py
mercurial/localrepo.py
mercurial/manifest.py
mercurial/patch.py
mercurial/sshserver.py
tests/coverage.py
tests/md5sum.py
tests/run-tests.py
--- a/contrib/churn.py	Thu Sep 21 21:24:53 2006 +0200
+++ b/contrib/churn.py	Sun Oct 01 19:26:33 2006 +0200
@@ -58,7 +58,7 @@
 
     for f in added:
         lines += dirtywork(f, None, mmap2)
-        
+
     for f in removed:
         lines += dirtywork(f, mmap1, None)
 
@@ -72,7 +72,7 @@
 
 def gather_stats(ui, repo, amap, revs=None, progress=False):
     stats = {}
-    
+
     cl    = repo.changelog
 
     if not revs:
@@ -117,7 +117,7 @@
 
 def churn(ui, repo, **opts):
     "Graphs the number of lines changed"
-    
+
     def pad(s, l):
         if len(s) < l:
             return s + " " * (l-len(s))
@@ -125,7 +125,7 @@
 
     def graph(n, maximum, width, char):
         n = int(n * width / float(maximum))
-        
+
         return char * (n)
 
     def get_aliases(f):
@@ -137,7 +137,7 @@
             aliases[alias] = actual
 
         return aliases
-    
+
     amap = {}
     aliases = opts.get('aliases')
     if aliases:
--- a/hgext/fetch.py	Thu Sep 21 21:24:53 2006 +0200
+++ b/hgext/fetch.py	Sun Oct 01 19:26:33 2006 +0200
@@ -63,7 +63,7 @@
             revs = [other.lookup(rev) for rev in opts['rev']]
         modheads = repo.pull(other, heads=revs, lock=lock)
         return postincoming(other, modheads)
-        
+
     parent, p2 = repo.dirstate.parents()
     if parent != repo.changelog.tip():
         raise util.Abort(_('working dir not at tip '
--- a/hgext/mq.py	Thu Sep 21 21:24:53 2006 +0200
+++ b/hgext/mq.py	Sun Oct 01 19:26:33 2006 +0200
@@ -130,7 +130,7 @@
         for c in bad_chars:
             if c in guard:
                 return _('invalid character in guard %r: %r') % (guard, c)
-        
+
     def set_active(self, guards):
         for guard in guards:
             bad = self.check_guard(guard)
@@ -172,7 +172,7 @@
         self.full_series[idx] = drop + ''.join([' #' + g for g in guards])
         self.parse_series()
         self.series_dirty = True
-        
+
     def pushable(self, idx):
         if isinstance(idx, str):
             idx = self.series.index(idx)
@@ -724,7 +724,7 @@
                 return (i, a.rev, a.name)
         return None
 
-    # if the exact patch name does not exist, we try a few 
+    # if the exact patch name does not exist, we try a few
     # variations.  If strict is passed, we try only #1
     #
     # 1) a number to indicate an offset in the series file
@@ -1638,7 +1638,7 @@
       hg qguard -- -foo
 
     To set guards on another patch:
-      hg qguard other.patch +2.6.17 -stable    
+      hg qguard other.patch +2.6.17 -stable
     '''
     def status(idx):
         guards = q.series_guards[idx] or ['unguarded']
@@ -1765,7 +1765,7 @@
         absdest = q.join(name)
     if os.path.exists(absdest):
         raise util.Abort(_('%s already exists') % absdest)
-    
+
     if name in q.series:
         raise util.Abort(_('A patch named %s already exists in the series file') % name)
 
@@ -1862,7 +1862,7 @@
 
     With no arguments, prints the currently active guards.
     With one argument, sets the active guard.
-    
+
     Use -n/--none to deactivate guards (no other arguments needed).
     When no guards are active, patches with positive guards are skipped
     and patches with negative guards are pushed.
@@ -1952,7 +1952,7 @@
                 parent = revlog.hex(self.dirstate.parents()[0])
                 if parent in [s.rev for s in self.mq.applied]:
                     raise util.Abort(errmsg)
-            
+
         def commit(self, *args, **opts):
             if len(args) >= 6:
                 force = args[5]
@@ -1968,7 +1968,7 @@
             if self.mq.applied and not force:
                 raise util.Abort(_('source has mq patches applied'))
             return super(mqrepo, self).push(remote, force, revs)
-            
+
         def tags(self):
             if self.tagscache:
                 return self.tagscache
--- a/mercurial/commands.py	Thu Sep 21 21:24:53 2006 +0200
+++ b/mercurial/commands.py	Sun Oct 01 19:26:33 2006 +0200
@@ -2502,7 +2502,7 @@
     """
 
     all = opts['all']
-    
+
     files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts)
     cwd = (pats and repo.getcwd()) or ''
     modified, added, removed, deleted, unknown, ignored, clean = [
@@ -3236,7 +3236,7 @@
             if t in table:
                 ui.warn(_("module %s overrides %s\n") % (name, t))
         table.update(cmdtable)
-    
+
 def dispatch(args):
     for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM':
         num = getattr(signal, name, None)
--- a/mercurial/context.py	Thu Sep 21 21:24:53 2006 +0200
+++ b/mercurial/context.py	Sun Oct 01 19:26:33 2006 +0200
@@ -223,7 +223,7 @@
                     pl[0] = (r[0], getlog(r[0]).rev(r[1]))
 
             return [ getctx(p, n) for p, n in pl if n != -1 ]
-                
+
         # find all ancestors
         needed = {self: 1}
         visit = [self]
--- a/mercurial/dirstate.py	Thu Sep 21 21:24:53 2006 +0200
+++ b/mercurial/dirstate.py	Sun Oct 01 19:26:33 2006 +0200
@@ -206,7 +206,7 @@
             self.dirs = {}
             for f in self.map:
                 self.updatedirs(f, 1)
-        
+
     def updatedirs(self, path, delta):
         if self.dirs is not None:
             for c in strutil.findall(path, '/'):
--- a/mercurial/hgweb/hgwebdir_mod.py	Thu Sep 21 21:24:53 2006 +0200
+++ b/mercurial/hgweb/hgwebdir_mod.py	Sun Oct 01 19:26:33 2006 +0200
@@ -37,7 +37,7 @@
                 if cp.has_option('web', 'motd'):
                     self.motd = cp.get('web', 'motd')
                 if cp.has_option('web', 'style'):
-		    self.style = cp.get('web', 'style')
+                    self.style = cp.get('web', 'style')
             if cp.has_section('paths'):
                 self.repos.extend(cleannames(cp.items('paths')))
             if cp.has_section('collections'):
--- a/mercurial/httprepo.py	Thu Sep 21 21:24:53 2006 +0200
+++ b/mercurial/httprepo.py	Sun Oct 01 19:26:33 2006 +0200
@@ -165,7 +165,7 @@
                                                proxyuser, proxypasswd or ''),
                     proxypath, proxyquery, proxyfrag))
                 handler = urllib2.ProxyHandler({scheme: proxyurl})
-                ui.debug(_('proxying through http://%s:%s\n') % 
+                ui.debug(_('proxying through http://%s:%s\n') %
                           (proxyhost, proxyport))
 
         # urllib2 takes proxy values from the environment and those
--- a/mercurial/localrepo.py	Thu Sep 21 21:24:53 2006 +0200
+++ b/mercurial/localrepo.py	Sun Oct 01 19:26:33 2006 +0200
@@ -1760,6 +1760,6 @@
 
 def instance(ui, path, create):
     return localrepository(ui, util.drop_scheme('file', path), create)
-    
+
 def islocal(path):
     return True
--- a/mercurial/manifest.py	Thu Sep 21 21:24:53 2006 +0200
+++ b/mercurial/manifest.py	Sun Oct 01 19:26:33 2006 +0200
@@ -53,7 +53,7 @@
         for f, n in self.parselines(delta):
             deltamap.rawset(f, n)
         return deltamap
-            
+
     def read(self, node):
         if node == nullid: return manifestdict() # don't upset local cache
         if self.mapcache and self.mapcache[0] == node:
--- a/mercurial/patch.py	Thu Sep 21 21:24:53 2006 +0200
+++ b/mercurial/patch.py	Sun Oct 01 19:26:33 2006 +0200
@@ -128,7 +128,7 @@
             self.op = 'MODIFY'
             self.copymod = False
             self.lineno = 0
-    
+
     # Filter patch for git information
     gitre = re.compile('diff --git a/(.*) b/(.*)')
     pf = file(patchname)
--- a/mercurial/sshserver.py	Thu Sep 21 21:24:53 2006 +0200
+++ b/mercurial/sshserver.py	Sun Oct 01 19:26:33 2006 +0200
@@ -124,7 +124,7 @@
     def client_url(self):
         client = os.environ.get('SSH_CLIENT', '').split(' ', 1)[0]
         return 'remote:ssh:' + client
-        
+
     def do_unbundle(self):
         their_heads = self.getarg()[1].split()
 
--- a/tests/coverage.py	Thu Sep 21 21:24:53 2006 +0200
+++ b/tests/coverage.py	Sun Oct 01 19:26:33 2006 +0200
@@ -87,19 +87,19 @@
         self.excluded = excluded
         self.suite_spots = suite_spots
         self.excluding_suite = 0
-        
+
     def doRecursive(self, node):
         self.recordNodeLine(node)
         for n in node.getChildNodes():
             self.dispatch(n)
 
     visitStmt = visitModule = doRecursive
-    
+
     def doCode(self, node):
         if hasattr(node, 'decorators') and node.decorators:
             self.dispatch(node.decorators)
         self.doSuite(node, node.code)
-    
+
     visitFunction = visitClass = doCode
 
     def getFirstLine(self, node):
@@ -119,17 +119,17 @@
         for n in node.getChildNodes():
             lineno = max(lineno, self.getLastLine(n))
         return lineno
-    
+
     def doStatement(self, node):
         self.recordLine(self.getFirstLine(node))
 
     visitAssert = visitAssign = visitAssTuple = visitDiscard = visitPrint = \
         visitPrintnl = visitRaise = visitSubscript = visitDecorators = \
         doStatement
-    
+
     def recordNodeLine(self, node):
         return self.recordLine(node.lineno)
-    
+
     def recordLine(self, lineno):
         # Returns a bool, whether the line is included or excluded.
         if lineno:
@@ -153,9 +153,9 @@
                 self.statements[lineno] = 1
                 return 1
         return 0
-    
+
     default = recordNodeLine
-    
+
     def recordAndDispatch(self, node):
         self.recordNodeLine(node)
         self.dispatch(node)
@@ -166,7 +166,7 @@
             self.excluding_suite = 1
         self.recordAndDispatch(body)
         self.excluding_suite = exsuite
-        
+
     def doPlainWordSuite(self, prevsuite, suite):
         # Finding the exclude lines for else's is tricky, because they aren't
         # present in the compiler parse tree.  Look at the previous suite,
@@ -180,11 +180,11 @@
                 break
         else:
             self.doSuite(None, suite)
-        
+
     def doElse(self, prevsuite, node):
         if node.else_:
             self.doPlainWordSuite(prevsuite, node.else_)
-    
+
     def visitFor(self, node):
         self.doSuite(node, node.body)
         self.doElse(node.body, node)
@@ -216,11 +216,11 @@
             else:
                 self.doSuite(a, h)
         self.doElse(node.handlers[-1][2], node)
-    
+
     def visitTryFinally(self, node):
         self.doSuite(node, node.body)
         self.doPlainWordSuite(node.body, node.final)
-        
+
     def visitGlobal(self, node):
         # "global" statements don't execute like others (they don't call the
         # trace function), so don't record their line numbers.
@@ -240,7 +240,7 @@
     # A dictionary with an entry for (Python source file name, line number
     # in that file) if that line has been executed.
     c = {}
-    
+
     # A map from canonical Python source file name to a dictionary in
     # which there's an entry for each line number that has been
     # executed.
@@ -266,12 +266,12 @@
         self.xstack = []
         self.relative_dir = os.path.normcase(os.path.abspath(os.curdir)+os.path.sep)
 
-    # t(f, x, y).  This method is passed to sys.settrace as a trace function.  
-    # See [van Rossum 2001-07-20b, 9.2] for an explanation of sys.settrace and 
+    # t(f, x, y).  This method is passed to sys.settrace as a trace function.
+    # See [van Rossum 2001-07-20b, 9.2] for an explanation of sys.settrace and
     # the arguments and return value of the trace function.
     # See [van Rossum 2001-07-20a, 3.2] for a description of frame and code
     # objects.
-    
+
     def t(self, f, w, a):                                   #pragma: no cover
         #print w, f.f_code.co_filename, f.f_lineno
         if w == 'line':
@@ -279,7 +279,7 @@
             for c in self.cstack:
                 c[(f.f_code.co_filename, f.f_lineno)] = 1
         return self.t
-    
+
     def help(self, error=None):
         if error:
             print error
@@ -330,7 +330,7 @@
             self.help("You must specify at least one of -e, -x, -r, or -a.")
         if not args_needed and args:
             self.help("Unexpected arguments %s." % args)
-        
+
         self.get_ready()
         self.exclude('#pragma[: ]+[nN][oO] [cC][oO][vV][eE][rR]')
 
@@ -359,14 +359,14 @@
 
     def use_cache(self, usecache):
         self.usecache = usecache
-        
+
     def get_ready(self):
         if self.usecache and not self.cache:
             self.cache = os.path.abspath(os.environ.get(self.cache_env,
                                                         self.cache_default))
             self.restore()
         self.analysis_cache = {}
-        
+
     def start(self):
         self.get_ready()
         if self.nesting == 0:                               #pragma: no cover
@@ -374,7 +374,7 @@
             if hasattr(threading, 'settrace'):
                 threading.settrace(self.t)
         self.nesting += 1
-        
+
     def stop(self):
         self.nesting -= 1
         if self.nesting == 0:                               #pragma: no cover
@@ -398,7 +398,7 @@
     def begin_recursive(self):
         self.cstack.append(self.c)
         self.xstack.append(self.exclude_re)
-        
+
     def end_recursive(self):
         self.c = self.cstack.pop()
         self.exclude_re = self.xstack.pop()
@@ -452,7 +452,7 @@
             self.canonical_filename_cache[filename] = cf
         return self.canonical_filename_cache[filename]
 
-    # canonicalize_filenames().  Copy results from "c" to "cexecuted", 
+    # canonicalize_filenames().  Copy results from "c" to "cexecuted",
     # canonicalizing filenames on the way.  Clear the "c" map.
 
     def canonicalize_filenames(self):
@@ -550,7 +550,7 @@
         import parser
         tree = parser.suite(text+'\n\n').totuple(1)
         self.get_suite_spots(tree, suite_spots)
-            
+
         # Use the compiler module to parse the text and find the executable
         # statements.  We add newlines to be impervious to final partial lines.
         statements = {}
@@ -713,7 +713,7 @@
             except:
                 if not ignore_errors:
                     raise
-                
+
     def annotate_file(self, filename, statements, excluded, missing, directory=None):
         source = open(filename, 'r')
         if directory:
@@ -741,7 +741,7 @@
             if self.blank_re.match(line):
                 dest.write('  ')
             elif self.else_re.match(line):
-                # Special logic for lines containing only 'else:'.  
+                # Special logic for lines containing only 'else:'.
                 # See [GDR 2001-12-04b, 3.2].
                 if i >= len(statements) and j >= len(missing):
                     dest.write('! ')
@@ -850,7 +850,7 @@
 # Thanks, Allen.
 #
 # 2005-12-02 NMB Call threading.settrace so that all threads are measured.
-# Thanks Martin Fuzzey. Add a file argument to report so that reports can be 
+# Thanks Martin Fuzzey. Add a file argument to report so that reports can be
 # captured to a different destination.
 #
 # 2005-12-03 NMB coverage.py can now measure itself.
--- a/tests/md5sum.py	Thu Sep 21 21:24:53 2006 +0200
+++ b/tests/md5sum.py	Sun Oct 01 19:26:33 2006 +0200
@@ -16,7 +16,7 @@
     except IOError, msg:
         sys.stderr.write('%s: Can\'t open: %s\n' % (filename, msg))
         sys.exit(1)
-    
+
     m = md5.new()
     try:
         while 1:
--- a/tests/run-tests.py	Thu Sep 21 21:24:53 2006 +0200
+++ b/tests/run-tests.py	Sun Oct 01 19:26:33 2006 +0200
@@ -104,7 +104,7 @@
         # windows fallback
         shutil.copyfile(sys.executable, my_python)
         shutil.copymode(sys.executable, my_python)
-            
+
 def install_hg():
     vlog("# Performing temporary installation of HG")
     installerrs = os.path.join("tests", "install.err")
@@ -358,7 +358,7 @@
             args = os.listdir(".")
         for test in args:
             if (test.startswith("test-") and '~' not in test and
-                ('.' not in test or test.endswith('.py') or 
+                ('.' not in test or test.endswith('.py') or
                  test.endswith('.bat'))):
                 ret = run_one(test)
                 if ret is None: