--- a/hgext/convert/__init__.py Sat Dec 29 01:14:45 2007 +0100
+++ b/hgext/convert/__init__.py Sat Dec 29 19:49:48 2007 +0100
@@ -57,7 +57,7 @@
exclude path/to/file
rename from/file to/file
-
+
The 'include' directive causes a file, or all files under a
directory, to be included in the destination repository, and the
exclusion of all other files and dirs not explicitely included.
--- a/hgext/convert/common.py Sat Dec 29 01:14:45 2007 +0100
+++ b/hgext/convert/common.py Sat Dec 29 19:49:48 2007 +0100
@@ -104,13 +104,13 @@
def getchangedfiles(self, rev, i):
"""Return the files changed by rev compared to parent[i].
-
+
i is an index selecting one of the parents of rev. The return
value should be the list of files that are different in rev and
this parent.
If rev has no parents, i is None.
-
+
This function is only needed to support --filemap
"""
raise NotImplementedError()
@@ -279,7 +279,7 @@
self.order.append(key)
super(mapfile, self).__setitem__(key, value)
fp.close()
-
+
def __setitem__(self, key, value):
if self.fp is None:
try:
--- a/hgext/convert/subversion.py Sat Dec 29 01:14:45 2007 +0100
+++ b/hgext/convert/subversion.py Sat Dec 29 19:49:48 2007 +0100
@@ -208,7 +208,7 @@
self.heads.append(brev)
if oldmodule:
- self.tags = '%s/%s' % (oldmodule, tags)
+ self.tags = '%s/%s' % (oldmodule, tags)
else:
self.tags = '/%s' % tags
@@ -714,7 +714,7 @@
def join(self, name):
return os.path.join(self.wc, '.svn', name)
-
+
def revmapfile(self):
return self.join('hg-shamap')
@@ -750,7 +750,7 @@
if not path.startswith('/'):
path = '/' + path
path = 'file://' + path
-
+
ui.status(_('initializing svn wc %r\n') % os.path.basename(wcpath))
self.run0('checkout', path, wcpath)
@@ -849,7 +849,7 @@
if files:
self.run('add', quiet=True, *files)
return files
-
+
def tidy_dirs(self, names):
dirs = list(self.dirs_of(names))
dirs.sort(reverse=True)
--- a/hgext/hgk.py Sat Dec 29 01:14:45 2007 +0100
+++ b/hgext/hgk.py Sat Dec 29 19:49:48 2007 +0100
@@ -13,7 +13,7 @@
# querying of information, and an extension to mercurial named hgk.py,
# which provides hooks for hgk to get information. hgk can be found in
# the contrib directory, and hgk.py can be found in the hgext
-# directory.
+# directory.
#
# To load the hgext.py extension, add it to your .hgrc file (you have
# to use your global $HOME/.hgrc file, not one in a repository). You
@@ -309,10 +309,10 @@
def config(ui, repo, **opts):
"""print extension options"""
def writeopt(name, value):
- ui.write('k=%s\nv=%s\n' % (name, value))
+ ui.write('k=%s\nv=%s\n' % (name, value))
writeopt('vdiff', ui.config('hgk', 'vdiff', ''))
-
+
def view(ui, repo, *etc, **opts):
"start interactive history viewer"
--- a/mercurial/cmdutil.py Sat Dec 29 01:14:45 2007 +0100
+++ b/mercurial/cmdutil.py Sat Dec 29 19:49:48 2007 +0100
@@ -773,10 +773,10 @@
def showcopies(**args):
c = [{'name': x[0], 'source': x[1]} for x in copies]
return showlist('file_copy', c, plural='file_copies', **args)
-
+
files = []
def getfiles():
- if not files:
+ if not files:
files[:] = self.repo.status(
log.parents(changenode)[0], changenode)[:3]
return files
--- a/mercurial/commands.py Sat Dec 29 01:14:45 2007 +0100
+++ b/mercurial/commands.py Sat Dec 29 19:49:48 2007 +0100
@@ -717,7 +717,7 @@
ui.write(_(" (Current patch tool may be incompatible with patch,"
" or misconfigured. Please check your .hgrc file)\n"))
else:
- ui.write(_(" Internal patcher failure, please report this error"
+ ui.write(_(" Internal patcher failure, please report this error"
" to http://www.selenic.com/mercurial/bts\n"))
problems += patchproblems
@@ -1702,7 +1702,7 @@
The manifest is the list of files being version controlled. If no revision
is given then the first parent of the working directory is used.
- With -v flag, print file permissions, symlink and executable bits. With
+ With -v flag, print file permissions, symlink and executable bits. With
--debug flag, print file revision hashes.
"""
--- a/mercurial/context.py Sat Dec 29 01:14:45 2007 +0100
+++ b/mercurial/context.py Sat Dec 29 19:49:48 2007 +0100
@@ -483,7 +483,7 @@
return self._manifest.flags(path)
except KeyError:
return ''
-
+
pnode = self._parents[0].changeset()[0]
orig = self._repo.dirstate.copies().get(path, path)
node, flag = self._repo.manifest.find(pnode, orig)
--- a/mercurial/hgweb/common.py Sat Dec 29 01:14:45 2007 +0100
+++ b/mercurial/hgweb/common.py Sat Dec 29 19:49:48 2007 +0100
@@ -21,7 +21,7 @@
from BaseHTTPServer import BaseHTTPRequestHandler
responses = BaseHTTPRequestHandler.responses
return responses.get(code, ('Error', 'Unknown error'))[0]
-
+
def statusmessage(code):
return '%d %s' % (code, _statusmessage(code))
--- a/mercurial/hgweb/hgwebdir_mod.py Sat Dec 29 01:14:45 2007 +0100
+++ b/mercurial/hgweb/hgwebdir_mod.py Sat Dec 29 19:49:48 2007 +0100
@@ -75,7 +75,7 @@
try:
virtual = req.env.get("PATH_INFO", "").strip('/')
-
+
# a static file
if virtual.startswith('static/') or 'static' in req.form:
static = os.path.join(templater.templatepath(), 'static')
@@ -122,7 +122,7 @@
# prefixes not found
tmpl = self.templater(req)
req.respond(404, tmpl("notfound", repo=virtual))
-
+
except ErrorResponse, err:
tmpl = self.templater(req)
req.respond(err.code, tmpl('error', error=err.message or ''))
@@ -173,7 +173,7 @@
parts = [req.env['PATH_INFO'], name]
if req.env['SCRIPT_NAME']:
- parts.insert(0, req.env['SCRIPT_NAME'])
+ parts.insert(0, req.env['SCRIPT_NAME'])
url = ('/'.join(parts).replace("//", "/")) + '/'
# update time with local timezone
--- a/mercurial/hgweb/request.py Sat Dec 29 01:14:45 2007 +0100
+++ b/mercurial/hgweb/request.py Sat Dec 29 19:49:48 2007 +0100
@@ -58,7 +58,7 @@
except socket.error, inst:
if inst[0] != errno.ECONNRESET:
raise
-
+
def write(self, *things):
self.respond('200 Script output follows', *things)
@@ -86,7 +86,7 @@
self.header(headers)
def wsgiapplication(app_maker):
- application = app_maker()
- def run_wsgi(env, respond):
- application(env, respond)
- return run_wsgi
+ application = app_maker()
+ def run_wsgi(env, respond):
+ application(env, respond)
+ return run_wsgi
--- a/mercurial/localrepo.py Sat Dec 29 01:14:45 2007 +0100
+++ b/mercurial/localrepo.py Sat Dec 29 19:49:48 2007 +0100
@@ -288,7 +288,7 @@
'''
self.tags()
-
+
return self._tagstypecache.get(tagname)
def _hgtagsnodes(self):
--- a/mercurial/patch.py Sat Dec 29 01:14:45 2007 +0100
+++ b/mercurial/patch.py Sat Dec 29 19:49:48 2007 +0100
@@ -818,7 +818,7 @@
fname = (afile in bfile) and afile or bfile
elif gooda:
fname = afile
-
+
if not fname:
if not nullb:
fname = (afile in bfile) and afile or bfile
@@ -826,7 +826,7 @@
fname = afile
else:
raise PatchError(_("undefined source and destination files"))
-
+
return fname, missing
class linereader:
@@ -1029,7 +1029,7 @@
for gp in gitpatches:
if gp.op in ('COPY', 'RENAME'):
copyfile(gp.oldpath, gp.path)
- changed[gp.path] = (gp.op, gp)
+ changed[gp.path] = (gp.op, gp)
else:
raise util.Abort(_('unsupported parser state: %s') % state)
--- a/mercurial/util.py Sat Dec 29 01:14:45 2007 +0100
+++ b/mercurial/util.py Sat Dec 29 19:49:48 2007 +0100
@@ -1709,7 +1709,7 @@
def hidepassword(url):
'''replaces the password in the url string by three asterisks (***)
-
+
>>> hidepassword('http://www.example.com/some/path#fragment')
'http://www.example.com/some/path#fragment'
>>> hidepassword('http://me@www.example.com/some/path#fragment')
--- a/tests/coverage.py Sat Dec 29 01:14:45 2007 +0100
+++ b/tests/coverage.py Sat Dec 29 19:49:48 2007 +0100
@@ -105,20 +105,20 @@
self.excluded = excluded
self.suite_spots = suite_spots
self.excluding_suite = 0
-
+
def doRecursive(self, 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.recordAndDispatch(node.code)
else:
self.doSuite(node, node.code)
-
+
visitFunction = visitClass = doCode
def getFirstLine(self, node):
@@ -138,14 +138,14 @@
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 = visitPrint = \
visitPrintnl = visitRaise = visitSubscript = visitDecorators = \
doStatement
-
+
def visitPass(self, node):
# Pass statements have weird interactions with docstrings. If this
# pass statement is part of one of those pairs, claim that the statement
@@ -154,10 +154,10 @@
if l:
lines = self.suite_spots.get(l, [l,l])
self.statements[lines[1]] = 1
-
+
def visitDiscard(self, node):
# Discard nodes are statements that execute an expression, but then
- # discard the results. This includes function calls, so we can't
+ # discard the results. This includes function calls, so we can't
# ignore them all. But if the expression is a constant, the statement
# won't be "executed", so don't count it now.
if node.expr.__class__.__name__ != 'Const':
@@ -171,7 +171,7 @@
return self.recordLine(self.getFirstLine(node))
else:
return 0
-
+
def recordLine(self, lineno):
# Returns a bool, whether the line is included or excluded.
if lineno:
@@ -195,9 +195,9 @@
self.statements[lineno] = 1
return 1
return 0
-
+
default = recordNodeLine
-
+
def recordAndDispatch(self, node):
self.recordNodeLine(node)
self.dispatch(node)
@@ -208,7 +208,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,
@@ -222,11 +222,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)
@@ -256,14 +256,14 @@
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 visitWith(self, node):
self.doSuite(node, node.body)
-
+
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.
@@ -283,7 +283,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.
@@ -311,12 +311,12 @@
self.relative_dir = os.path.normcase(os.path.abspath(os.curdir)+os.sep)
self.exclude('# *pragma[: ]*[nN][oO] *[cC][oO][vV][eE][rR]')
- # 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, unused): #pragma: no cover
if w == 'line':
#print "Executing %s @ %d" % (f.f_code.co_filename, f.f_lineno)
@@ -324,7 +324,7 @@
for c in self.cstack:
c[(f.f_code.co_filename, f.f_lineno)] = 1
return self.t
-
+
def help(self, error=None): #pragma: no cover
if error:
print error
@@ -376,14 +376,14 @@
args_needed = (settings.get('execute')
or settings.get('annotate')
or settings.get('report'))
- action = (settings.get('erase')
+ action = (settings.get('erase')
or settings.get('collect')
or args_needed)
if not action:
help_fn("You must specify at least one of -e, -x, -c, -r, or -a.")
if not args_needed and args:
help_fn("Unexpected arguments: %s" % " ".join(args))
-
+
self.parallel_mode = settings.get('parallel-mode')
self.get_ready()
@@ -401,7 +401,7 @@
self.collect()
if not args:
args = self.cexecuted.keys()
-
+
ignore_errors = settings.get('ignore-errors')
show_missing = settings.get('show-missing')
directory = settings.get('directory=')
@@ -421,7 +421,7 @@
self.usecache = usecache
if cache_file and not self.cache:
self.cache_default = cache_file
-
+
def get_ready(self, parallel_mode=False):
if self.usecache and not self.cache:
self.cache = os.environ.get(self.cache_env, self.cache_default)
@@ -429,7 +429,7 @@
self.cache += "." + gethostname() + "." + str(os.getpid())
self.restore()
self.analysis_cache = {}
-
+
def start(self, parallel_mode=False):
self.get_ready()
if self.nesting == 0: #pragma: no cover
@@ -437,7 +437,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
@@ -461,7 +461,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()
@@ -541,7 +541,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):
@@ -573,7 +573,7 @@
# in the source code, (3) a list of lines of excluded statements,
# and (4), a map of line numbers to multi-line line number ranges, for
# statements that cross lines.
-
+
def analyze_morf(self, morf):
if self.analysis_cache.has_key(morf):
return self.analysis_cache[morf]
@@ -600,26 +600,26 @@
if len(tree) == 3 and type(tree[2]) == type(1):
return tree[2]
tree = tree[1]
-
+
def last_line_of_tree(self, tree):
while True:
if len(tree) == 3 and type(tree[2]) == type(1):
return tree[2]
tree = tree[-1]
-
+
def find_docstring_pass_pair(self, tree, spots):
for i in range(1, len(tree)):
if self.is_string_constant(tree[i]) and self.is_pass_stmt(tree[i+1]):
first_line = self.first_line_of_tree(tree[i])
last_line = self.last_line_of_tree(tree[i+1])
self.record_multiline(spots, first_line, last_line)
-
+
def is_string_constant(self, tree):
try:
return tree[0] == symbol.stmt and tree[1][1][1][0] == symbol.expr_stmt
except:
return False
-
+
def is_pass_stmt(self, tree):
try:
return tree[0] == symbol.stmt and tree[1][1][1][0] == symbol.pass_stmt
@@ -629,7 +629,7 @@
def record_multiline(self, spots, i, j):
for l in range(i, j+1):
spots[l] = (i, j)
-
+
def get_suite_spots(self, tree, spots):
""" Analyze a parse tree to find suite introducers which span a number
of lines.
@@ -671,7 +671,7 @@
# treat them differently, especially in the common case of a
# function with a doc string and a single pass statement.
self.find_docstring_pass_pair(tree[i], spots)
-
+
elif tree[i][0] == symbol.simple_stmt:
first_line = self.first_line_of_tree(tree[i])
last_line = self.last_line_of_tree(tree[i])
@@ -696,7 +696,7 @@
tree = parser.suite(text+'\n\n').totuple(1)
self.get_suite_spots(tree, suite_spots)
#print "Suite spots:", 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 = {}
@@ -806,7 +806,7 @@
else:
globbed.append(morf)
morfs = globbed
-
+
morfs = self.filter_by_prefix(morfs, omit_prefixes)
morfs.sort(self.morf_name_compare)
@@ -873,7 +873,7 @@
except:
if not ignore_errors:
raise
-
+
def annotate_file(self, filename, statements, excluded, missing, directory=None):
source = open(filename, 'r')
if directory:
@@ -901,7 +901,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('! ')
@@ -925,40 +925,40 @@
the_coverage = coverage()
# Module functions call methods in the singleton object.
-def use_cache(*args, **kw):
+def use_cache(*args, **kw):
return the_coverage.use_cache(*args, **kw)
-def start(*args, **kw):
+def start(*args, **kw):
return the_coverage.start(*args, **kw)
-def stop(*args, **kw):
+def stop(*args, **kw):
return the_coverage.stop(*args, **kw)
-def erase(*args, **kw):
+def erase(*args, **kw):
return the_coverage.erase(*args, **kw)
-def begin_recursive(*args, **kw):
+def begin_recursive(*args, **kw):
return the_coverage.begin_recursive(*args, **kw)
-def end_recursive(*args, **kw):
+def end_recursive(*args, **kw):
return the_coverage.end_recursive(*args, **kw)
-def exclude(*args, **kw):
+def exclude(*args, **kw):
return the_coverage.exclude(*args, **kw)
-def analysis(*args, **kw):
+def analysis(*args, **kw):
return the_coverage.analysis(*args, **kw)
-def analysis2(*args, **kw):
+def analysis2(*args, **kw):
return the_coverage.analysis2(*args, **kw)
-def report(*args, **kw):
+def report(*args, **kw):
return the_coverage.report(*args, **kw)
-def annotate(*args, **kw):
+def annotate(*args, **kw):
return the_coverage.annotate(*args, **kw)
-def annotate_file(*args, **kw):
+def annotate_file(*args, **kw):
return the_coverage.annotate_file(*args, **kw)
# Save coverage data when Python exits. (The atexit module wasn't
@@ -1033,7 +1033,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/run-tests.py Sat Dec 29 01:14:45 2007 +0100
+++ b/tests/run-tests.py Sat Dec 29 19:49:48 2007 +0100
@@ -541,7 +541,7 @@
fp = os.fdopen(options.child, 'w')
fp.write('%d\n%d\n%d\n' % (tested, skipped, failed))
for s in skips:
- fp.write("%s %s\n" % s)
+ fp.write("%s %s\n" % s)
fp.close()
else:
print