diff --git a/hgext/graphlog.py b/hgext/graphlog.py --- a/hgext/graphlog.py +++ b/hgext/graphlog.py @@ -95,7 +95,7 @@ def draw_edges(edges, nodeline, interlin else: nodeline[2 * end] = "+" if start > end: - (start, end) = (end,start) + (start, end) = (end, start) for i in range(2 * start + 1, 2 * end): if nodeline[i] != "+": nodeline[i] = "-" diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -1850,7 +1850,7 @@ def prev(ui, repo, **opts): summary=opts.get('summary')) def setupheaderopts(ui, opts): - def do(opt,val): + def do(opt, val): if not opts[opt] and opts['current' + opt]: opts[opt] = val do('user', ui.username()) diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -160,7 +160,7 @@ class bundlerepository(localrepo.localre localrepo.localrepository.__init__(self, ui, path) except error.RepoError: self._tempparent = tempfile.mkdtemp() - localrepo.instance(ui,self._tempparent,1) + localrepo.instance(ui, self._tempparent, 1) localrepo.localrepository.__init__(self, ui, self._tempparent) if path: diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -663,9 +663,9 @@ def commit(ui, repo, *pats, **opts): ui.status(_('created new head\n')) if ui.debugflag: - ui.write(_('committed changeset %d:%s\n') % (rev,hex(node))) + ui.write(_('committed changeset %d:%s\n') % (rev, hex(node))) elif ui.verbose: - ui.write(_('committed changeset %d:%s\n') % (rev,short(node))) + ui.write(_('committed changeset %d:%s\n') % (rev, short(node))) def copy(ui, repo, *pats, **opts): """mark files as copied for the next commit diff --git a/mercurial/hgweb/protocol.py b/mercurial/hgweb/protocol.py --- a/mercurial/hgweb/protocol.py +++ b/mercurial/hgweb/protocol.py @@ -26,7 +26,7 @@ def lookup(repo, req): try: r = hex(repo.lookup(req.form['key'][0])) success = 1 - except Exception,inst: + except Exception, inst: r = str(inst) success = 0 resp = "%s %s\n" % (success, r) diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -339,7 +339,7 @@ def tags(web, req, tmpl): i.reverse() parity = paritygen(web.stripecount) - def entries(notip=False,limit=0, **map): + def entries(notip=False, limit=0, **map): count = 0 for k, n in i: if notip and k == "tip": diff --git a/mercurial/sshserver.py b/mercurial/sshserver.py --- a/mercurial/sshserver.py +++ b/mercurial/sshserver.py @@ -59,7 +59,7 @@ class sshserver(object): try: r = hex(self.repo.lookup(key)) success = 1 - except Exception,inst: + except Exception, inst: r = str(inst) success = 0 self.respond("%s %s\n" % (success, r)) diff --git a/mercurial/verify.py b/mercurial/verify.py --- a/mercurial/verify.py +++ b/mercurial/verify.py @@ -78,7 +78,7 @@ def _verify(repo): msg = _("rev %d points to unexpected changeset %d") err(None, msg % (i, lr), f) if linkrevs: - warn(_(" (expected %s)") % " ".join(map(str,linkrevs))) + warn(_(" (expected %s)") % " ".join(map(str, linkrevs))) lr = None # can't be trusted try: diff --git a/mercurial/win32.py b/mercurial/win32.py --- a/mercurial/win32.py +++ b/mercurial/win32.py @@ -18,7 +18,7 @@ import win32api import errno, os, sys, pywintypes, win32con, win32file, win32process import winerror import osutil, encoding -from win32com.shell import shell,shellcon +from win32com.shell import shell, shellcon def os_link(src, dst): try: