# HG changeset patch # User Thomas Arendsen Hein # Date 1181154172 -7200 # Node ID 96d8a56d4ef9057003a9dd0d3fea73af25e82303 # Parent 86a66cce95668d5d3d42a285bb47eaadade889b0 Removed trailing whitespace and tabs from python files diff --git a/hgext/convert/__init__.py b/hgext/convert/__init__.py --- a/hgext/convert/__init__.py +++ b/hgext/convert/__init__.py @@ -50,7 +50,7 @@ class converter_source(object): def getchanges(self, version): """Return sorted list of (filename, id) tuples for all files changed in rev. - + id just tells us which revision to return in getfile(), e.g. in git it's an object hash.""" raise NotImplementedError() @@ -252,7 +252,7 @@ class convert_cvs(converter_source): user, host, root = m.group(1), m.group(2), m.group(3) if conntype != "pserver": - if conntype == "rsh": + if conntype == "rsh": rsh = os.environ.get("CVS_RSH" or "rsh") if user: cmd = [rsh, '-l', user, host] + cmd diff --git a/hgext/graphlog.py b/hgext/graphlog.py --- a/hgext/graphlog.py +++ b/hgext/graphlog.py @@ -1,7 +1,7 @@ # ASCII graph log extension for Mercurial # # Copyright 2007 Joel Rosdahl -# +# # This software may be used and distributed according to the terms of # the GNU General Public License, incorporated herein by reference. diff --git a/hgext/purge.py b/hgext/purge.py --- a/hgext/purge.py +++ b/hgext/purge.py @@ -83,12 +83,12 @@ def _check_missing(ui, repo, missing, fo dirstate.walk() can yield filenames different from the ones stored in the dirstate. This already confuses the status and add commands, but with purge this may cause data loss. - + To prevent this, _check_missing will abort if there are missing - files. The force option will let the user skip the check if he + files. The force option will let the user skip the check if he knows it is safe. - - Even with the force option this function will check if any of the + + Even with the force option this function will check if any of the missing files is still available in the working dir: if so there may be some problem with the underlying filesystem, so it aborts unconditionally.""" diff --git a/hgext/transplant.py b/hgext/transplant.py --- a/hgext/transplant.py +++ b/hgext/transplant.py @@ -336,7 +336,7 @@ class transplanter: inmsg = True message.append(line) return (node, user, date, '\n'.join(message), parents) - + def log(self, user, date, message, p1, p2, merge=False): '''journal changelog metadata for later recover''' diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -901,7 +901,7 @@ def debuginstall(ui): fa = writetemp(a) d = mdiff.unidiff(a, None, b, None, os.path.basename(fa)) fd = writetemp(d) - + files = {} try: patch.patch(fd, ui, cwd=os.path.dirname(fa), files=files) @@ -909,7 +909,7 @@ def debuginstall(ui): ui.write(_(" patch call failed:\n")) ui.write(" " + str(e) + "\n") problems += 1 - else: + else: if list(files) != [os.path.basename(fa)]: ui.write(_(" unexpected patch output!")) ui.write(_(" (you may have an incompatible version of patch)\n")) @@ -919,7 +919,7 @@ def debuginstall(ui): ui.write(_(" patch test failed!")) ui.write(_(" (you may have an incompatible version of patch)\n")) problems += 1 - + os.unlink(fa) os.unlink(fd) @@ -2548,7 +2548,7 @@ def tags(ui, repo): hexfunc = ui.debugflag and hex or short for t, n in l: try: - hn = hexfunc(n) + hn = hexfunc(n) r = "%5d:%s" % (repo.changelog.rev(n), hexfunc(n)) except revlog.LookupError: r = " ?:%s" % hn diff --git a/mercurial/hgweb/server.py b/mercurial/hgweb/server.py --- a/mercurial/hgweb/server.py +++ b/mercurial/hgweb/server.py @@ -195,11 +195,11 @@ def create_server(ui, repo): pass class MercurialHTTPServer(object, _mixin, BaseHTTPServer.HTTPServer): - + # SO_REUSEADDR has broken semantics on windows if os.name == 'nt': allow_reuse_address = 0 - + def __init__(self, *args, **kargs): BaseHTTPServer.HTTPServer.__init__(self, *args, **kargs) self.accesslog = accesslog diff --git a/mercurial/httprepo.py b/mercurial/httprepo.py --- a/mercurial/httprepo.py +++ b/mercurial/httprepo.py @@ -208,7 +208,7 @@ class httprepository(remoterepository): # 1.0 here is the _protocol_ version opener.addheaders = [('User-agent', 'mercurial/proto-1.0')] urllib2.install_opener(opener) - + def __del__(self): if self.handler: self.handler.close_all() diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -651,8 +651,8 @@ class localrepository(repo.repository): cp = self.dirstate.copied(fn) if cp: # Mark the new revision of this file as a copy of another - # file. This copy data will effectively act as a parent - # of this new revision. If this is a merge, the first + # file. This copy data will effectively act as a parent + # of this new revision. If this is a merge, the first # parent will be the nullid (meaning "look up the copy data") # and the second one will be the other parent. For example: # diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -305,7 +305,7 @@ def patch(patchname, ui, strip=1, cwd=No raise util.Abort(_('no patch command found in hgrc or PATH')) if util.needbinarypatch(): args.append('--binary') - + if cwd: args.append('-d %s' % util.shellquote(cwd)) fp = os.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip, diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -823,7 +823,7 @@ if os.name == 'nt': if inst.errno != 0: raise self.close() raise IOError(errno.EPIPE, 'Broken pipe') - + def flush(self): try: return self.fp.flush() @@ -912,7 +912,7 @@ if os.name == 'nt': # username and groupname functions above, too. def isowner(fp, st=None): return True - + def find_in_path(name, path, default=None): '''find name in search path. path can be string (will be split with os.pathsep), or iterable thing that returns strings. if name @@ -920,17 +920,17 @@ if os.name == 'nt': using cmd.exe rules, using PATHEXT.''' if isinstance(path, str): path = path.split(os.pathsep) - + pathext = os.environ.get('PATHEXT', '.COM;.EXE;.BAT;.CMD') pathext = pathext.lower().split(os.pathsep) isexec = os.path.splitext(name)[1].lower() in pathext - + for p in path: p_name = os.path.join(p, name) - + if isexec and os.path.exists(p_name): return p_name - + for ext in pathext: p_name_ext = p_name + ext if os.path.exists(p_name_ext): @@ -1074,7 +1074,7 @@ else: if st is None: st = fstat(fp) return st.st_uid == os.getuid() - + def find_in_path(name, path, default=None): '''find name in search path. path can be string (will be split with os.pathsep), or iterable thing that returns strings. if name diff --git a/tests/test-simplemerge.py b/tests/test-simplemerge.py --- a/tests/test-simplemerge.py +++ b/tests/test-simplemerge.py @@ -38,7 +38,7 @@ def split_lines(t): # common base TZU = split_lines(""" The Nameless is the origin of Heaven and Earth; The named is the mother of all things. - + Therefore let there always be non-being, so we may see their subtlety, And let there always be being, @@ -69,7 +69,7 @@ TAO = split_lines(""" The Way that c The name that can be named is not the eternal name. The Nameless is the origin of Heaven and Earth; The named is the mother of all things. - + Therefore let there always be non-being, so we may see their subtlety, And let there always be being, @@ -77,7 +77,7 @@ TAO = split_lines(""" The Way that c The two are the same, But after they are produced, they have different names. - + -- The Way of Lao-Tzu, tr. Wing-tsit Chan """) @@ -95,7 +95,7 @@ MERGED_RESULT = split_lines(""" The they have different names. <<<<<<< LAO ======= - + -- The Way of Lao-Tzu, tr. Wing-tsit Chan >>>>>>> TAO @@ -144,7 +144,7 @@ class TestMerge3(TestCase): self.assertEquals(list(m3.merge_groups()), [('a', ['aaa', 'bbb']), ('unchanged', ['zz'])]) - + def test_null_insert(self): m3 = Merge3([], ['aaa', 'bbb'], @@ -235,7 +235,7 @@ 333 mid_marker='--', end_marker='>>') self.assertEquals(''.join(ml), 'aaa\n222\nbbb\n') - + def test_insert_clash(self): """Both try to insert lines in the same place.""" @@ -370,7 +370,7 @@ bbb this_text = ("a\n"*10+"b\n" * 10).splitlines(True) other_text = ("a\n"*10+"c\n"+"b\n" * 8 + "c\n").splitlines(True) m3 = Merge3(base_text, other_text, this_text) - m_lines = m3.merge_lines('OTHER', 'THIS', reprocess=True, + m_lines = m3.merge_lines('OTHER', 'THIS', reprocess=True, base_marker='|||||||') self.assertRaises(CantReprocessAndShowBase, list, m_lines) diff --git a/tests/test-trusted.py b/tests/test-trusted.py --- a/tests/test-trusted.py +++ b/tests/test-trusted.py @@ -155,7 +155,7 @@ print 'untrusted:' print u2.config('foobar', 'baz', untrusted=True) print u2.config('paths', 'interpolated', untrusted=True) -print +print print "# error handling" def assertraises(f, exc=util.Abort):