--- a/contrib/check-code.py Fri May 11 18:41:04 2012 +0200
+++ b/contrib/check-code.py Sat May 12 15:54:54 2012 +0200
@@ -139,7 +139,8 @@
(r' x+[xo][\'"]\n\s+[\'"]x', 'string join across lines with no space'),
(r'[^\n]\Z', "no trailing newline"),
(r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"),
-# (r'^\s+[^_ \n][^_. \n]+_[^_\n]+\s*=', "don't use underbars in identifiers"),
+# (r'^\s+[^_ \n][^_. \n]+_[^_\n]+\s*=',
+# "don't use underbars in identifiers"),
(r'^\s+(self\.)?[A-za-z][a-z0-9]+[A-Z]\w* = ',
"don't use camelcase in identifiers"),
(r'^\s*(if|while|def|class|except|try)\s[^[\n]*:\s*[^\\n]#\s]+',
--- a/contrib/perf.py Fri May 11 18:41:04 2012 +0200
+++ b/contrib/perf.py Sat May 12 15:54:54 2012 +0200
@@ -42,7 +42,8 @@
def perfstatus(ui, repo, *pats):
#m = match.always(repo.root, repo.getcwd())
- #timer(lambda: sum(map(len, repo.dirstate.status(m, [], False, False, False))))
+ #timer(lambda: sum(map(len, repo.dirstate.status(m, [], False, False,
+ # False))))
timer(lambda: sum(map(len, repo.status())))
def perfheads(ui, repo):
--- a/doc/gendoc.py Fri May 11 18:41:04 2012 +0200
+++ b/doc/gendoc.py Sat May 12 15:54:54 2012 +0200
@@ -102,9 +102,9 @@
ui.write("\n")
section(ui, _("Extensions"))
- ui.write(_("This section contains help for extensions that are distributed "
- "together with Mercurial. Help for other extensions is available "
- "in the help system."))
+ ui.write(_("This section contains help for extensions that are "
+ "distributed together with Mercurial. Help for other "
+ "extensions is available in the help system."))
ui.write("\n\n"
".. contents::\n"
" :class: htmlonly\n"
--- a/hgext/bugzilla.py Fri May 11 18:41:04 2012 +0200
+++ b/hgext/bugzilla.py Sat May 12 15:54:54 2012 +0200
@@ -416,7 +416,8 @@
for id in bugs.keys():
self.ui.status(_(' bug %s\n') % id)
cmdfmt = self.ui.config('bugzilla', 'notify', self.default_notify)
- bzdir = self.ui.config('bugzilla', 'bzdir', '/var/www/html/bugzilla')
+ bzdir = self.ui.config('bugzilla', 'bzdir',
+ '/var/www/html/bugzilla')
try:
# Backwards-compatible with old notify string, which
# took one string. This will throw with a new format
@@ -468,8 +469,8 @@
userid = self.get_user_id(defaultuser)
user = defaultuser
except KeyError:
- raise util.Abort(_('cannot find bugzilla user id for %s or %s') %
- (user, defaultuser))
+ raise util.Abort(_('cannot find bugzilla user id for %s or %s')
+ % (user, defaultuser))
return (user, userid)
def updatebug(self, bugid, newstate, text, committer):
--- a/hgext/convert/__init__.py Fri May 11 18:41:04 2012 +0200
+++ b/hgext/convert/__init__.py Sat May 12 15:54:54 2012 +0200
@@ -328,7 +328,8 @@
('', 'root', '', _('specify cvsroot')),
# Options specific to builtin cvsps
('', 'parents', '', _('show parent changesets')),
- ('', 'ancestors', '', _('show current changeset in ancestor branches')),
+ ('', 'ancestors', '',
+ _('show current changeset in ancestor branches')),
# Options that are ignored for compatibility with cvsps-2.1
('A', 'cvs-direct', None, _('ignored for compatibility')),
],
--- a/hgext/convert/cvs.py Fri May 11 18:41:04 2012 +0200
+++ b/hgext/convert/cvs.py Sat May 12 15:54:54 2012 +0200
@@ -121,12 +121,13 @@
pf = open(cvspass)
for line in pf.read().splitlines():
part1, part2 = line.split(' ', 1)
+ # /1 :pserver:user@example.com:2401/cvsroot/foo
+ # Ah<Z
if part1 == '/1':
- # /1 :pserver:user@example.com:2401/cvsroot/foo Ah<Z
part1, part2 = part2.split(' ', 1)
format = format1
+ # :pserver:user@example.com:/cvsroot/foo Ah<Z
else:
- # :pserver:user@example.com:/cvsroot/foo Ah<Z
format = format0
if part1 == format:
passw = part2
--- a/hgext/convert/cvsps.py Fri May 11 18:41:04 2012 +0200
+++ b/hgext/convert/cvsps.py Sat May 12 15:54:54 2012 +0200
@@ -336,7 +336,8 @@
else:
myrev = '.'.join(myrev[:-2] + ['0', myrev[-2]])
branches = [b for b in branchmap if branchmap[b] == myrev]
- assert len(branches) == 1, 'unknown branch: %s' % e.mergepoint
+ assert len(branches) == 1, ('unknown branch: %s'
+ % e.mergepoint)
e.mergepoint = branches[0]
else:
e.mergepoint = None
--- a/hgext/convert/git.py Fri May 11 18:41:04 2012 +0200
+++ b/hgext/convert/git.py Sat May 12 15:54:54 2012 +0200
@@ -181,8 +181,8 @@
m, f = l[:-1].split("\t")
changes.append(f)
else:
- fh = self.gitopen('git diff-tree --name-only --root -r %s "%s^%s" --'
- % (version, version, i + 1))
+ fh = self.gitopen('git diff-tree --name-only --root -r %s '
+ '"%s^%s" --' % (version, version, i + 1))
changes = [f.rstrip('\n') for f in fh]
if fh.close():
raise util.Abort(_('cannot read changes in %s') % version)
--- a/hgext/convert/hg.py Fri May 11 18:41:04 2012 +0200
+++ b/hgext/convert/hg.py Sat May 12 15:54:54 2012 +0200
@@ -294,7 +294,8 @@
if not parents:
files = sorted(ctx.manifest())
# getcopies() is not needed for roots, but it is a simple way to
- # detect missing revlogs and abort on errors or populate self.ignored
+ # detect missing revlogs and abort on errors or populate
+ # self.ignored
self.getcopies(ctx, parents, files)
return [(f, rev) for f in files if f not in self.ignored], {}
if self._changescache and self._changescache[0] == rev:
--- a/hgext/convert/subversion.py Fri May 11 18:41:04 2012 +0200
+++ b/hgext/convert/subversion.py Sat May 12 15:54:54 2012 +0200
@@ -85,8 +85,8 @@
self.copyfrom_rev = p.copyfrom_rev
self.action = p.action
-def get_log_child(fp, url, paths, start, end, limit=0, discover_changed_paths=True,
- strict_node_history=False):
+def get_log_child(fp, url, paths, start, end, limit=0,
+ discover_changed_paths=True, strict_node_history=False):
protocol = -1
def receiver(orig_paths, revnum, author, date, message, pool):
if orig_paths is not None:
@@ -276,7 +276,8 @@
except ValueError:
raise util.Abort(_('svn: revision %s is not an integer') % rev)
- self.trunkname = self.ui.config('convert', 'svn.trunk', 'trunk').strip('/')
+ self.trunkname = self.ui.config('convert', 'svn.trunk',
+ 'trunk').strip('/')
self.startrev = self.ui.config('convert', 'svn.startrev', default=0)
try:
self.startrev = int(self.startrev)
@@ -862,7 +863,8 @@
pass
except SubversionException, (inst, num):
if num == svn.core.SVN_ERR_FS_NO_SUCH_REVISION:
- raise util.Abort(_('svn: branch has no revision %s') % to_revnum)
+ raise util.Abort(_('svn: branch has no revision %s')
+ % to_revnum)
raise
def getfile(self, file, rev):
@@ -949,8 +951,8 @@
if not p.startswith('/'):
p = self.module + '/' + p
relpaths.append(p.strip('/'))
- args = [self.baseurl, relpaths, start, end, limit, discover_changed_paths,
- strict_node_history]
+ args = [self.baseurl, relpaths, start, end, limit,
+ discover_changed_paths, strict_node_history]
arg = encodeargs(args)
hgexe = util.hgexecutable()
cmd = '%s debugsvnlog' % util.shellquote(hgexe)
--- a/hgext/eol.py Fri May 11 18:41:04 2012 +0200
+++ b/hgext/eol.py Sat May 12 15:54:54 2012 +0200
@@ -111,7 +111,8 @@
return s
if ui.configbool('eol', 'only-consistent', True) and inconsistenteol(s):
return s
- if ui.configbool('eol', 'fix-trailing-newline', False) and s and s[-1] != '\n':
+ if (ui.configbool('eol', 'fix-trailing-newline', False)
+ and s and s[-1] != '\n'):
s = s + '\n'
return eolre.sub('\n', s)
@@ -121,7 +122,8 @@
return s
if ui.configbool('eol', 'only-consistent', True) and inconsistenteol(s):
return s
- if ui.configbool('eol', 'fix-trailing-newline', False) and s and s[-1] != '\n':
+ if (ui.configbool('eol', 'fix-trailing-newline', False)
+ and s and s[-1] != '\n'):
s = s + '\n'
return eolre.sub('\r\n', s)
--- a/hgext/hgk.py Fri May 11 18:41:04 2012 +0200
+++ b/hgext/hgk.py Sat May 12 15:54:54 2012 +0200
@@ -95,7 +95,8 @@
nlprefix = '\n' + prefix
if ctx is None:
ctx = repo[n]
- ui.write("tree %s\n" % short(ctx.changeset()[0])) # use ctx.node() instead ??
+ # use ctx.node() instead ??
+ ui.write("tree %s\n" % short(ctx.changeset()[0]))
for p in ctx.parents():
ui.write("parent %s\n" % p)
@@ -113,7 +114,8 @@
ui.write("branch %s\n\n" % ctx.branch())
if prefix != "":
- ui.write("%s%s\n" % (prefix, description.replace('\n', nlprefix).strip()))
+ ui.write("%s%s\n" % (prefix,
+ description.replace('\n', nlprefix).strip()))
else:
ui.write(description + "\n")
if prefix:
--- a/hgext/highlight/__init__.py Fri May 11 18:41:04 2012 +0200
+++ b/hgext/highlight/__init__.py Sat May 12 15:54:54 2012 +0200
@@ -51,11 +51,13 @@
pg_style = web.config('web', 'pygments_style', 'colorful')
fmter = highlight.HtmlFormatter(style = pg_style)
req.respond(common.HTTP_OK, 'text/css')
- return ['/* pygments_style = %s */\n\n' % pg_style, fmter.get_style_defs('')]
+ return ['/* pygments_style = %s */\n\n' % pg_style,
+ fmter.get_style_defs('')]
def extsetup():
# monkeypatch in the new version
- extensions.wrapfunction(webcommands, '_filerevision', filerevision_highlight)
+ extensions.wrapfunction(webcommands, '_filerevision',
+ filerevision_highlight)
extensions.wrapfunction(webcommands, 'annotate', annotate_highlight)
webcommands.highlightcss = generate_css
webcommands.__all__.append('highlightcss')
--- a/hgext/inotify/__init__.py Fri May 11 18:41:04 2012 +0200
+++ b/hgext/inotify/__init__.py Sat May 12 15:54:54 2012 +0200
@@ -46,7 +46,8 @@
files = match.files()
if '.' in files:
files = []
- if self._inotifyon and not ignored and not subrepos and not self._dirty:
+ if (self._inotifyon and not ignored and not subrepos and
+ not self._dirty):
cli = client(ui, repo)
try:
result = cli.statusquery(files, match, False,
--- a/hgext/mq.py Fri May 11 18:41:04 2012 +0200
+++ b/hgext/mq.py Sat May 12 15:54:54 2012 +0200
@@ -1246,9 +1246,11 @@
raise util.Abort(
_("cannot use --exact and --check together"))
if move:
- raise util.Abort(_("cannot use --exact and --move together"))
+ raise util.Abort(_('cannot use --exact and --move '
+ 'together'))
if self.applied:
- raise util.Abort(_("cannot push --exact with applied patches"))
+ raise util.Abort(_('cannot push --exact with applied '
+ 'patches'))
root = self.series[start]
target = patchheader(self.join(root), self.plainmode).parent
if not target:
@@ -2187,7 +2189,8 @@
@command("qclone",
[('', 'pull', None, _('use pull protocol to copy metadata')),
- ('U', 'noupdate', None, _('do not update the new working directories')),
+ ('U', 'noupdate', None,
+ _('do not update the new working directories')),
('', 'uncompressed', None,
_('use uncompressed transfer (fast over LAN)')),
('p', 'patches', '',
@@ -2289,7 +2292,8 @@
"""print the entire series file
Returns 0 on success."""
- repo.mq.qseries(repo, missing=opts.get('missing'), summary=opts.get('summary'))
+ repo.mq.qseries(repo, missing=opts.get('missing'),
+ summary=opts.get('summary'))
return 0
@command("qtop", seriesopts, _('hg qtop [-s]'))
@@ -2510,7 +2514,8 @@
if p in patches or p == parent:
ui.warn(_('Skipping already folded patch %s\n') % p)
if q.isapplied(p):
- raise util.Abort(_('qfold cannot fold already applied patch %s') % p)
+ raise util.Abort(_('qfold cannot fold already applied patch %s')
+ % p)
patches.append(p)
for p in patches:
@@ -2618,7 +2623,8 @@
args = list(args)
if opts.get('list'):
if args or opts.get('none'):
- raise util.Abort(_('cannot mix -l/--list with options or arguments'))
+ raise util.Abort(_('cannot mix -l/--list with options or '
+ 'arguments'))
for i in xrange(len(q.series)):
status(i)
return
@@ -2684,7 +2690,8 @@
@command("^qpush",
[('c', 'check', None, _('tolerate non-conflicting local changes')),
('f', 'force', None, _('apply on top of local changes')),
- ('e', 'exact', None, _('apply the target patch to its recorded parent')),
+ ('e', 'exact', None,
+ _('apply the target patch to its recorded parent')),
('l', 'list', None, _('list patch name in commit text')),
('a', 'all', None, _('apply all patches')),
('m', 'merge', None, _('merge from another queue (DEPRECATED)')),
@@ -3374,8 +3381,8 @@
tags = result[0]
for patch in mqtags:
if patch[1] in tags:
- self.ui.warn(_('Tag %s overrides mq patch of the same name\n')
- % patch[1])
+ self.ui.warn(_('Tag %s overrides mq patch of the same '
+ 'name\n') % patch[1])
else:
tags[patch[1]] = patch[0]
--- a/hgext/notify.py Fri May 11 18:41:04 2012 +0200
+++ b/hgext/notify.py Sat May 12 15:54:54 2012 +0200
@@ -353,8 +353,8 @@
author = repo[rev].user()
else:
data += ui.popbuffer()
- ui.note(_('notify: suppressing notification for merge %d:%s\n') %
- (rev, repo[rev].hex()[:12]))
+ ui.note(_('notify: suppressing notification for merge %d:%s\n')
+ % (rev, repo[rev].hex()[:12]))
ui.pushbuffer()
if count:
n.diff(ctx, repo['tip'])
--- a/hgext/patchbomb.py Fri May 11 18:41:04 2012 +0200
+++ b/hgext/patchbomb.py Sat May 12 15:54:54 2012 +0200
@@ -109,7 +109,8 @@
msg = email.MIMEMultipart.MIMEMultipart()
if body:
msg.attach(mail.mimeencode(ui, body, _charsets, opts.get('test')))
- p = mail.mimetextpatch('\n'.join(patchlines), 'x-patch', opts.get('test'))
+ p = mail.mimetextpatch('\n'.join(patchlines), 'x-patch',
+ opts.get('test'))
binnode = bin(node)
# if node is mq patch, it will have the patch file's name as a tag
if not patchname:
@@ -119,7 +120,8 @@
patchname = patchtags[0]
elif total > 1:
patchname = cmdutil.makefilename(repo, '%b-%n.patch',
- binnode, seqno=idx, total=total)
+ binnode, seqno=idx,
+ total=total)
else:
patchname = cmdutil.makefilename(repo, '%b.patch', binnode)
disposition = 'inline'
--- a/hgext/record.py Fri May 11 18:41:04 2012 +0200
+++ b/hgext/record.py Sat May 12 15:54:54 2012 +0200
@@ -516,10 +516,11 @@
'(use "hg commit" instead)'))
changes = repo.status(match=match)[:3]
- diffopts = mdiff.diffopts(git=True, nodates=True,
- ignorews=opts.get('ignore_all_space'),
- ignorewsamount=opts.get('ignore_space_change'),
- ignoreblanklines=opts.get('ignore_blank_lines'))
+ diffopts = mdiff.diffopts(
+ git=True, nodates=True,
+ ignorews=opts.get('ignore_all_space'),
+ ignorewsamount=opts.get('ignore_space_change'),
+ ignoreblanklines=opts.get('ignore_blank_lines'))
chunks = patch.diff(repo, changes=changes, opts=diffopts)
fp = cStringIO.StringIO()
fp.write(''.join(chunks))
--- a/hgext/zeroconf/__init__.py Fri May 11 18:41:04 2012 +0200
+++ b/hgext/zeroconf/__init__.py Sat May 12 15:54:54 2012 +0200
@@ -119,7 +119,8 @@
name = os.path.basename(repo)
path = (prefix + repo).strip('/')
desc = u.config('web', 'description', name)
- publish(name, desc, path, util.getport(u.config("web", "port", 8000)))
+ publish(name, desc, path,
+ util.getport(u.config("web", "port", 8000)))
# listen
--- a/mercurial/bundlerepo.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/bundlerepo.py Sat May 12 15:54:54 2012 +0200
@@ -323,13 +323,16 @@
Returns a tuple (local, csets, cleanupfn):
- "local" is a local repo from which to obtain the actual incoming changesets; it
- is a bundlerepo for the obtained bundle when the original "other" is remote.
+ "local" is a local repo from which to obtain the actual incoming
+ changesets; it is a bundlerepo for the obtained bundle when the
+ original "other" is remote.
"csets" lists the incoming changeset node ids.
- "cleanupfn" must be called without arguments when you're done processing the
- changes; it closes both the original "other" and the one returned here.
+ "cleanupfn" must be called without arguments when you're done processing
+ the changes; it closes both the original "other" and the one returned
+ here.
'''
- tmp = discovery.findcommonincoming(repo, other, heads=onlyheads, force=force)
+ tmp = discovery.findcommonincoming(repo, other, heads=onlyheads,
+ force=force)
common, incoming, rheads = tmp
if not incoming:
try:
--- a/mercurial/commands.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/commands.py Sat May 12 15:54:54 2012 +0200
@@ -1687,7 +1687,8 @@
revs = set((int(r) for r in revs))
def events():
for r in rlog:
- yield 'n', (r, list(set(p for p in rlog.parentrevs(r) if p != -1)))
+ yield 'n', (r, list(set(p for p in rlog.parentrevs(r)
+ if p != -1)))
if r in revs:
yield 'l', (r, "r%i" % r)
elif repo:
@@ -1706,7 +1707,8 @@
if newb != b:
yield 'a', newb
b = newb
- yield 'n', (r, list(set(p for p in cl.parentrevs(r) if p != -1)))
+ yield 'n', (r, list(set(p for p in cl.parentrevs(r)
+ if p != -1)))
if tags:
ls = labels.get(r)
if ls:
@@ -1764,7 +1766,8 @@
_('[-l REV] [-r REV] [-b BRANCH]... [OTHER]'))
def debugdiscovery(ui, repo, remoteurl="default", **opts):
"""runs the changeset discovery protocol in isolation"""
- remoteurl, branches = hg.parseurl(ui.expandpath(remoteurl), opts.get('branch'))
+ remoteurl, branches = hg.parseurl(ui.expandpath(remoteurl),
+ opts.get('branch'))
remote = hg.peer(repo, opts, remoteurl)
ui.status(_('comparing with %s\n') % util.hidepassword(remoteurl))
@@ -1774,7 +1777,8 @@
def doit(localheads, remoteheads):
if opts.get('old'):
if localheads:
- raise util.Abort('cannot use localheads with old style discovery')
+ raise util.Abort('cannot use localheads with old style '
+ 'discovery')
common, _in, hds = treediscovery.findcommonincoming(repo, remote,
force=True)
common = set(common)
@@ -1901,7 +1905,8 @@
" nodeid p1 p2\n")
elif format == 1:
ui.write(" rev flag offset length"
- " size " + basehdr + " link p1 p2 nodeid\n")
+ " size " + basehdr + " link p1 p2"
+ " nodeid\n")
for i in r:
node = r.node(i)
@@ -2026,8 +2031,8 @@
def debugknown(ui, repopath, *ids, **opts):
"""test whether node ids are known to a repo
- Every ID must be a full-length hex node id string. Returns a list of 0s and 1s
- indicating unknown/known.
+ Every ID must be a full-length hex node id string. Returns a list of 0s
+ and 1s indicating unknown/known.
"""
repo = hg.peer(ui, opts, repopath)
if not repo.capable('known'):
@@ -2259,13 +2264,17 @@
fmt2 = pcfmtstr(numdeltas, 4)
ui.write('deltas against prev : ' + fmt % pcfmt(numprev, numdeltas))
if numprev > 0:
- ui.write(' where prev = p1 : ' + fmt2 % pcfmt(nump1prev, numprev))
- ui.write(' where prev = p2 : ' + fmt2 % pcfmt(nump2prev, numprev))
- ui.write(' other : ' + fmt2 % pcfmt(numoprev, numprev))
+ ui.write(' where prev = p1 : ' + fmt2 % pcfmt(nump1prev,
+ numprev))
+ ui.write(' where prev = p2 : ' + fmt2 % pcfmt(nump2prev,
+ numprev))
+ ui.write(' other : ' + fmt2 % pcfmt(numoprev,
+ numprev))
if gdelta:
ui.write('deltas against p1 : ' + fmt % pcfmt(nump1, numdeltas))
ui.write('deltas against p2 : ' + fmt % pcfmt(nump2, numdeltas))
- ui.write('deltas against other : ' + fmt % pcfmt(numother, numdeltas))
+ ui.write('deltas against other : ' + fmt % pcfmt(numother,
+ numdeltas))
@command('debugrevspec', [], ('REVSPEC'))
def debugrevspec(ui, repo, expr):
@@ -4433,7 +4442,8 @@
if currentbranchheads == modheads:
ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n"))
elif currentbranchheads > 1:
- ui.status(_("(run 'hg heads .' to see heads, 'hg merge' to merge)\n"))
+ ui.status(_("(run 'hg heads .' to see heads, 'hg merge' to "
+ "merge)\n"))
else:
ui.status(_("(run 'hg heads' to see heads)\n"))
else:
@@ -5405,7 +5415,8 @@
t = []
source, branches = hg.parseurl(ui.expandpath('default'))
other = hg.peer(repo, {}, source)
- revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev'))
+ revs, checkout = hg.addbranchrevs(repo, other, branches,
+ opts.get('rev'))
ui.debug('comparing with %s\n' % util.hidepassword(source))
repo.ui.pushbuffer()
commoninc = discovery.findcommonincoming(repo, other)
--- a/mercurial/commandserver.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/commandserver.py Sat May 12 15:54:54 2012 +0200
@@ -142,8 +142,8 @@
else:
logfile = open(logpath, 'a')
- # the ui here is really the repo ui so take its baseui so we don't end up
- # with its local configuration
+ # the ui here is really the repo ui so take its baseui so we don't end
+ # up with its local configuration
self.ui = repo.baseui
self.repo = repo
self.repoui = repo.ui
--- a/mercurial/context.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/context.py Sat May 12 15:54:54 2012 +0200
@@ -233,7 +233,8 @@
_('not found in manifest'))
if '_manifestdelta' in self.__dict__ or path in self.files():
if path in self._manifestdelta:
- return self._manifestdelta[path], self._manifestdelta.flags(path)
+ return (self._manifestdelta[path],
+ self._manifestdelta.flags(path))
node, flag = self._repo.manifest.find(self._changeset[0], path)
if not node:
raise error.LookupError(self._node, path,
--- a/mercurial/dagparser.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/dagparser.py Sat May 12 15:54:54 2012 +0200
@@ -268,7 +268,8 @@
s += c
i += 1
c = nextch()
- raise util.Abort(_("invalid character in dag description: %s...") % s)
+ raise util.Abort(_('invalid character in dag description: '
+ '%s...') % s)
def dagtextlines(events,
addspaces=True,
@@ -436,7 +437,9 @@
>>> dagtext([('n', (0, [-1])), ('a', 'ann'), ('n', (1, [0]))])
'+1 @ann +1'
- >>> dagtext([('n', (0, [-1])), ('a', 'my annotation'), ('n', (1, [0]))])
+ >>> dagtext([('n', (0, [-1])),
+ ... ('a', 'my annotation'),
+ ... ('n', (1, [0]))])
'+1 @"my annotation" +1'
Commands:
@@ -447,7 +450,9 @@
>>> dagtext([('n', (0, [-1])), ('c', 'my command'), ('n', (1, [0]))])
'+1 !"my command" +1'
- >>> dagtext([('n', (0, [-1])), ('C', 'my command line'), ('n', (1, [0]))])
+ >>> dagtext([('n', (0, [-1])),
+ ... ('C', 'my command line'),
+ ... ('n', (1, [0]))])
'+1 !!my command line\\n+1'
Comments:
--- a/mercurial/dirstate.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/dirstate.py Sat May 12 15:54:54 2012 +0200
@@ -695,7 +695,8 @@
if not skipstep3 and not exact:
visit = sorted([f for f in dmap if f not in results and matchfn(f)])
for nf, st in zip(visit, util.statfiles([join(i) for i in visit])):
- if not st is None and not getkind(st.st_mode) in (regkind, lnkkind):
+ if (not st is None and
+ not getkind(st.st_mode) in (regkind, lnkkind)):
st = None
results[nf] = st
for s in subrepos:
--- a/mercurial/discovery.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/discovery.py Sat May 12 15:54:54 2012 +0200
@@ -86,13 +86,14 @@
self._computecommonmissing()
return self._missing
-def findcommonoutgoing(repo, other, onlyheads=None, force=False, commoninc=None):
+def findcommonoutgoing(repo, other, onlyheads=None, force=False,
+ commoninc=None):
'''Return an outgoing instance to identify the nodes present in repo but
not in other.
- If onlyheads is given, only nodes ancestral to nodes in onlyheads (inclusive)
- are included. If you already know the local repo's heads, passing them in
- onlyheads is faster than letting them be recomputed here.
+ If onlyheads is given, only nodes ancestral to nodes in onlyheads
+ (inclusive) are included. If you already know the local repo's heads,
+ passing them in onlyheads is faster than letting them be recomputed here.
If commoninc is given, it must the the result of a prior call to
findcommonincoming(repo, other, force) to avoid recomputing it here.'''
--- a/mercurial/dispatch.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/dispatch.py Sat May 12 15:54:54 2012 +0200
@@ -12,7 +12,8 @@
import ui as uimod
class request(object):
- def __init__(self, args, ui=None, repo=None, fin=None, fout=None, ferr=None):
+ def __init__(self, args, ui=None, repo=None, fin=None, fout=None,
+ ferr=None):
self.args = args
self.ui = ui
self.repo = repo
@@ -532,7 +533,8 @@
if cmd and util.safehasattr(fn, 'shell'):
d = lambda: fn(ui, *args[1:])
- return lambda: runcommand(lui, None, cmd, args[:1], ui, options, d, [], {})
+ return lambda: runcommand(lui, None, cmd, args[:1], ui, options, d,
+ [], {})
restorecommands()
@@ -680,7 +682,8 @@
return _dispatch(req)
if not path:
raise error.RepoError(_("no repository found in '%s'"
- " (.hg not found)") % os.getcwd())
+ " (.hg not found)")
+ % os.getcwd())
raise
if repo:
ui = repo.ui
--- a/mercurial/hgweb/hgweb_mod.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/hgweb/hgweb_mod.py Sat May 12 15:54:54 2012 +0200
@@ -73,7 +73,8 @@
self.repo = hg.repository(self.repo.ui, self.repo.root)
self.maxchanges = int(self.config("web", "maxchanges", 10))
self.stripecount = int(self.config("web", "stripes", 1))
- self.maxshortchanges = int(self.config("web", "maxshortchanges", 60))
+ self.maxshortchanges = int(self.config("web", "maxshortchanges",
+ 60))
self.maxfiles = int(self.config("web", "maxfiles", 10))
self.allowpull = self.configbool("web", "allowpull", True)
encoding.encoding = self.config("web", "encoding",
--- a/mercurial/localrepo.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/localrepo.py Sat May 12 15:54:54 2012 +0200
@@ -280,7 +280,8 @@
fp.write('\n')
for name in names:
m = munge and munge(name) or name
- if self._tagscache.tagtypes and name in self._tagscache.tagtypes:
+ if (self._tagscache.tagtypes and
+ name in self._tagscache.tagtypes):
old = self.tags().get(name, nullid)
fp.write('%s %s\n' % (hex(old), m))
fp.write('%s %s\n' % (hex(node), m))
@@ -360,7 +361,8 @@
@propertycache
def _tagscache(self):
- '''Returns a tagscache object that contains various tags related caches.'''
+ '''Returns a tagscache object that contains various tags related
+ caches.'''
# This simplifies its cache management by having one decorated
# function (this one) and the rest simply fetch things from it.
@@ -1173,7 +1175,8 @@
p1, p2 = self.dirstate.parents()
hookp1, hookp2 = hex(p1), (p2 != nullid and hex(p2) or '')
try:
- self.hook("precommit", throw=True, parent1=hookp1, parent2=hookp2)
+ self.hook("precommit", throw=True, parent1=hookp1,
+ parent2=hookp2)
ret = self.commitctx(cctx, True)
except:
if edited:
@@ -1309,7 +1312,8 @@
def status(self, node1='.', node2=None, match=None,
ignored=False, clean=False, unknown=False,
listsubrepos=False):
- """return status of files between two nodes or node and working directory
+ """return status of files between two nodes or node and working
+ directory.
If node1 is None, use the first dirstate parent instead.
If node2 is None, compare node1 with working directory.
@@ -1654,7 +1658,8 @@
# http: return remote's addchangegroup() or 0 for error
ret = remote.unbundle(cg, remoteheads, 'push')
else:
- # we return an integer indicating remote head count change
+ # we return an integer indicating remote head count
+ # change
ret = remote.addchangegroup(cg, 'push', self.url())
if ret:
@@ -1886,7 +1891,8 @@
for fname in sorted(changedfiles):
filerevlog = self.file(fname)
if not len(filerevlog):
- raise util.Abort(_("empty or missing revlog for %s") % fname)
+ raise util.Abort(_("empty or missing revlog for %s")
+ % fname)
fstate[0] = fname
fstate[1] = fnodes.pop(fname, {})
@@ -1986,7 +1992,8 @@
for fname in sorted(changedfiles):
filerevlog = self.file(fname)
if not len(filerevlog):
- raise util.Abort(_("empty or missing revlog for %s") % fname)
+ raise util.Abort(_("empty or missing revlog for %s")
+ % fname)
fstate[0] = fname
nodelist = gennodelst(filerevlog)
if nodelist:
@@ -2243,7 +2250,8 @@
(util.bytecount(total_bytes), elapsed,
util.bytecount(total_bytes / elapsed)))
- # new requirements = old non-format requirements + new format-related
+ # new requirements = old non-format requirements +
+ # new format-related
# requirements from the streamed-in repository
requirements.update(set(self.requirements) - self.supportedformats)
self._applyrequirements(requirements)
--- a/mercurial/manifest.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/manifest.py Sat May 12 15:54:54 2012 +0200
@@ -126,8 +126,8 @@
addlist[start:end] = array.array('c', content)
else:
del addlist[start:end]
- return "".join(struct.pack(">lll", start, end, len(content)) + content
- for start, end, content in x)
+ return "".join(struct.pack(">lll", start, end, len(content))
+ + content for start, end, content in x)
def checkforbidden(l):
for f in l:
--- a/mercurial/merge.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/merge.py Sat May 12 15:54:54 2012 +0200
@@ -363,7 +363,8 @@
removed += 1
elif m == "m": # merge
if f == '.hgsubstate': # subrepo states need updating
- subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx), overwrite)
+ subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx),
+ overwrite)
continue
f2, fd, flags, move = a[2:]
repo.wopener.audit(fd)
--- a/mercurial/patch.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/patch.py Sat May 12 15:54:54 2012 +0200
@@ -858,7 +858,8 @@
self.lenb = int(self.lenb)
self.starta = int(self.starta)
self.startb = int(self.startb)
- diffhelpers.addlines(lr, self.hunk, self.lena, self.lenb, self.a, self.b)
+ diffhelpers.addlines(lr, self.hunk, self.lena, self.lenb, self.a,
+ self.b)
# if we hit eof before finishing out the hunk, the last line will
# be zero length. Lets try to fix it up.
while len(self.hunk[-1]) == 0:
@@ -1620,8 +1621,9 @@
if opts.git or opts.upgrade:
copy = copies.pathcopies(ctx1, ctx2)
- difffn = lambda opts, losedata: trydiff(repo, revs, ctx1, ctx2,
- modified, added, removed, copy, getfilectx, opts, losedata, prefix)
+ difffn = (lambda opts, losedata:
+ trydiff(repo, revs, ctx1, ctx2, modified, added, removed,
+ copy, getfilectx, opts, losedata, prefix))
if opts.upgrade and not opts.git:
try:
def losedata(fn):
@@ -1862,7 +1864,8 @@
countwidth, count, pluses, minuses))
if stats:
- output.append(_(' %d files changed, %d insertions(+), %d deletions(-)\n')
+ output.append(_(' %d files changed, %d insertions(+), '
+ '%d deletions(-)\n')
% (len(stats), totaladds, totalremoves))
return ''.join(output)
--- a/mercurial/pure/mpatch.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/pure/mpatch.py Sat May 12 15:54:54 2012 +0200
@@ -85,10 +85,10 @@
p1, p2, l = struct.unpack(">lll", m.read(12))
pull(new, frags, p1 - last) # what didn't change
pull([], frags, p2 - p1) # what got deleted
- new.append((l, pos + 12)) # what got added
+ new.append((l, pos + 12)) # what got added
pos += l + 12
last = p2
- frags.extend(reversed(new)) # what was left at the end
+ frags.extend(reversed(new)) # what was left at the end
t = collect(b2, frags)
--- a/mercurial/revset.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/revset.py Sat May 12 15:54:54 2012 +0200
@@ -108,7 +108,8 @@
pos += 1
else:
raise error.ParseError(_("unterminated string"), s)
- elif c.isalnum() or c in '._' or ord(c) > 127: # gather up a symbol/keyword
+ # gather up a symbol/keyword
+ elif c.isalnum() or c in '._' or ord(c) > 127:
s = pos
pos += 1
while pos < l: # find end of symbol
@@ -257,7 +258,8 @@
def ancestorspec(repo, subset, x, n):
"""``set~n``
- Changesets that are the Nth ancestor (first parents only) of a changeset in set.
+ Changesets that are the Nth ancestor (first parents only) of a changeset
+ in set.
"""
try:
n = int(n[1])
--- a/mercurial/scmutil.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/scmutil.py Sat May 12 15:54:54 2012 +0200
@@ -141,8 +141,9 @@
elif (stat.S_ISDIR(st.st_mode) and
os.path.isdir(os.path.join(curpath, '.hg'))):
if not self.callback or not self.callback(curpath):
- raise util.Abort(_("path '%s' is inside nested repo %r") %
- (path, prefix))
+ raise util.Abort(_("path '%s' is inside nested "
+ "repo %r")
+ % (path, prefix))
prefixes.append(normprefix)
parts.pop()
normparts.pop()
@@ -654,8 +655,9 @@
unknown.append(abs)
if repo.ui.verbose or not exact:
repo.ui.status(_('adding %s\n') % ((pats and rel) or abs))
- elif repo.dirstate[abs] != 'r' and (not good or not os.path.lexists(target)
- or (os.path.isdir(target) and not os.path.islink(target))):
+ elif (repo.dirstate[abs] != 'r' and
+ (not good or not os.path.lexists(target) or
+ (os.path.isdir(target) and not os.path.islink(target)))):
deleted.append(abs)
if repo.ui.verbose or not exact:
repo.ui.status(_('removing %s\n') % ((pats and rel) or abs))
@@ -764,8 +766,9 @@
missings.append(r)
missings.sort()
if missings:
- raise error.RequirementError(_("unknown repository format: "
- "requires features '%s' (upgrade Mercurial)") % "', '".join(missings))
+ raise error.RequirementError(
+ _("unknown repository format: requires features '%s' (upgrade "
+ "Mercurial)") % "', '".join(missings))
return requirements
class filecacheentry(object):
--- a/mercurial/setdiscovery.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/setdiscovery.py Sat May 12 15:54:54 2012 +0200
@@ -134,11 +134,16 @@
return (ownheadhashes, True, srvheadhashes,)
# full blown discovery
- undecided = dag.nodeset() # own nodes where I don't know if remote knows them
- common = set() # own nodes I know we both know
- missing = set() # own nodes I know remote lacks
- # treat remote heads (and maybe own heads) as a first implicit sample response
+ # own nodes where I don't know if remote knows them
+ undecided = dag.nodeset()
+ # own nodes I know we both know
+ common = set()
+ # own nodes I know remote lacks
+ missing = set()
+
+ # treat remote heads (and maybe own heads) as a first implicit sample
+ # response
common.update(dag.ancestorset(srvheads))
undecided.difference_update(common)
--- a/mercurial/similar.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/similar.py Sat May 12 15:54:54 2012 +0200
@@ -44,7 +44,8 @@
'''
copies = {}
for i, r in enumerate(removed):
- repo.ui.progress(_('searching for similar files'), i, total=len(removed))
+ repo.ui.progress(_('searching for similar files'), i,
+ total=len(removed))
# lazily load text
@util.cachefunc
--- a/mercurial/simplemerge.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/simplemerge.py Sat May 12 15:54:54 2012 +0200
@@ -222,7 +222,8 @@
# section a[0:ia] has been disposed of, etc
iz = ia = ib = 0
- for zmatch, zend, amatch, aend, bmatch, bend in self.find_sync_regions():
+ for region in self.find_sync_regions():
+ zmatch, zend, amatch, aend, bmatch, bend = region
#print 'match base [%d:%d]' % (zmatch, zend)
matchlen = zend - zmatch
--- a/mercurial/sshrepo.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/sshrepo.py Sat May 12 15:54:54 2012 +0200
@@ -86,7 +86,8 @@
lines.append(l)
max_noise -= 1
else:
- self._abort(error.RepoError(_("no suitable response from remote hg")))
+ self._abort(error.RepoError(_('no suitable response from '
+ 'remote hg')))
self.capabilities = set()
for l in reversed(lines):
--- a/mercurial/subrepo.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/subrepo.py Sat May 12 15:54:54 2012 +0200
@@ -200,7 +200,8 @@
'use (l)ocal source (%s) or (r)emote source (%s)?\n')
% (subrelpath(sub), local, remote))
else:
- msg = (_(' subrepository sources for %s differ (in checked out version)\n'
+ msg = (_(' subrepository sources for %s differ (in checked out '
+ 'version)\n'
'use (l)ocal source (%s) or (r)emote source (%s)?\n')
% (subrelpath(sub), local, remote))
return ui.promptchoice(msg, (_('&Local'), _('&Remote')), 0)
@@ -498,8 +499,9 @@
% (subrelpath(self), srcurl))
parentrepo = self._repo._subparent
shutil.rmtree(self._repo.path)
- other, self._repo = hg.clone(self._repo._subparent.ui, {}, other,
- self._repo.root, update=False)
+ other, self._repo = hg.clone(self._repo._subparent.ui, {},
+ other, self._repo.root,
+ update=False)
self._initrepo(parentrepo, source, create=True)
else:
self._repo.ui.status(_('pulling subrepo %s from %s\n')
--- a/mercurial/ui.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/ui.py Sat May 12 15:54:54 2012 +0200
@@ -680,7 +680,8 @@
printed.'''
if self.tracebackflag:
if exc:
- traceback.print_exception(exc[0], exc[1], exc[2], file=self.ferr)
+ traceback.print_exception(exc[0], exc[1], exc[2],
+ file=self.ferr)
else:
traceback.print_exc(file=self.ferr)
return self.tracebackflag
--- a/mercurial/url.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/url.py Sat May 12 15:54:54 2012 +0200
@@ -377,7 +377,8 @@
keyfile = self.auth['key']
certfile = self.auth['cert']
- conn = httpsconnection(host, port, keyfile, certfile, *args, **kwargs)
+ conn = httpsconnection(host, port, keyfile, certfile, *args,
+ **kwargs)
conn.ui = self.ui
return conn
--- a/mercurial/wireproto.py Fri May 11 18:41:04 2012 +0200
+++ b/mercurial/wireproto.py Sat May 12 15:54:54 2012 +0200
@@ -24,9 +24,9 @@
class batcher(object):
'''base class for batches of commands submittable in a single request
- All methods invoked on instances of this class are simply queued and return a
- a future for the result. Once you call submit(), all the queued calls are
- performed and the results set in their respective futures.
+ All methods invoked on instances of this class are simply queued and
+ return a a future for the result. Once you call submit(), all the queued
+ calls are performed and the results set in their respective futures.
'''
def __init__(self):
self.calls = []
@@ -51,7 +51,8 @@
class remotebatch(batcher):
'''batches the queued calls; uses as few roundtrips as possible'''
def __init__(self, remote):
- '''remote must support _submitbatch(encbatch) and _submitone(op, encargs)'''
+ '''remote must support _submitbatch(encbatch) and
+ _submitone(op, encargs)'''
batcher.__init__(self)
self.remote = remote
def submit(self):
@@ -97,14 +98,14 @@
encresref = future()
# Return encoded arguments and future:
yield encargs, encresref
- # Assuming the future to be filled with the result from the batched request
- # now. Decode it:
+ # Assuming the future to be filled with the result from the batched
+ # request now. Decode it:
yield decode(encresref.value)
- The decorator returns a function which wraps this coroutine as a plain method,
- but adds the original method as an attribute called "batchable", which is
- used by remotebatch to split the call into separate encoding and decoding
- phases.
+ The decorator returns a function which wraps this coroutine as a plain
+ method, but adds the original method as an attribute called "batchable",
+ which is used by remotebatch to split the call into separate encoding and
+ decoding phases.
'''
def plain(*args, **opts):
batchable = f(*args, **opts)
--- a/setup.py Fri May 11 18:41:04 2012 +0200
+++ b/setup.py Sat May 12 15:54:54 2012 +0200
@@ -39,7 +39,8 @@
# The base IronPython distribution (as of 2.7.1) doesn't support bz2
isironpython = False
try:
- isironpython = platform.python_implementation().lower().find("ironpython") != -1
+ isironpython = (platform.python_implementation()
+ .lower().find("ironpython") != -1)
except:
pass
@@ -211,10 +212,12 @@
# Insert hgbuildmo first so that files in mercurial/locale/ are found
# when build_py is run next.
sub_commands = [('build_mo', None),
- # We also need build_ext before build_py. Otherwise, when 2to3 is called (in
- # build_py), it will not find osutil & friends, thinking that those modules are
- # global and, consequently, making a mess, now that all module imports are
- # global.
+
+ # We also need build_ext before build_py. Otherwise, when 2to3 is
+ # called (in build_py), it will not find osutil & friends,
+ # thinking that those modules are global and, consequently, making
+ # a mess, now that all module imports are global.
+
('build_ext', build.has_ext_modules),
] + build.sub_commands
@@ -292,7 +295,8 @@
self.distribution.ext_modules = []
else:
if not os.path.exists(os.path.join(get_python_inc(), 'Python.h')):
- raise SystemExit("Python headers are required to build Mercurial")
+ raise SystemExit('Python headers are required to build '
+ 'Mercurial')
def find_modules(self):
modules = build_py.find_modules(self)
--- a/tests/hghave Fri May 11 18:41:04 2012 +0200
+++ b/tests/hghave Sat May 12 15:54:54 2012 +0200
@@ -165,7 +165,8 @@
return False
def has_p4():
- return matchoutput('p4 -V', r'Rev\. P4/') and matchoutput('p4d -V', r'Rev\. P4D/')
+ return (matchoutput('p4 -V', r'Rev\. P4/') and
+ matchoutput('p4d -V', r'Rev\. P4D/'))
def has_symlink():
if not hasattr(os, "symlink"):
--- a/tests/test-check-code-hg.t Fri May 11 18:41:04 2012 +0200
+++ b/tests/test-check-code-hg.t Sat May 12 15:54:54 2012 +0200
@@ -8,16 +8,10 @@
$ hg manifest | xargs "$check_code" || echo 'FAILURE IS NOT AN OPTION!!!'
$ hg manifest | xargs "$check_code" --warnings --nolineno --per-file=0 || true
- contrib/check-code.py:0:
- > # (r'^\s+[^_ \n][^_. \n]+_[^_\n]+\s*=', "don't use underbars in identifiers"),
- warning: line over 80 characters
contrib/perf.py:0:
> except:
warning: naked except clause
contrib/perf.py:0:
- > #timer(lambda: sum(map(len, repo.dirstate.status(m, [], False, False, False))))
- warning: line over 80 characters
- contrib/perf.py:0:
> except:
warning: naked except clause
contrib/setup3k.py:0:
@@ -34,18 +28,6 @@
contrib/shrink-revlog.py:0:
> except:
warning: naked except clause
- doc/gendoc.py:0:
- > "together with Mercurial. Help for other extensions is available "
- warning: line over 80 characters
- hgext/bugzilla.py:0:
- > raise util.Abort(_('cannot find bugzilla user id for %s or %s') %
- warning: line over 80 characters
- hgext/bugzilla.py:0:
- > bzdir = self.ui.config('bugzilla', 'bzdir', '/var/www/html/bugzilla')
- warning: line over 80 characters
- hgext/convert/__init__.py:0:
- > ('', 'ancestors', '', _('show current changeset in ancestor branches')),
- warning: line over 80 characters
hgext/convert/bzr.py:0:
> except:
warning: naked except clause
@@ -59,12 +41,6 @@
hgext/convert/convcmd.py:0:
> except:
warning: naked except clause
- hgext/convert/cvs.py:0:
- > # /1 :pserver:user@example.com:2401/cvsroot/foo Ah<Z
- warning: line over 80 characters
- hgext/convert/cvsps.py:0:
- > assert len(branches) == 1, 'unknown branch: %s' % e.mergepoint
- warning: line over 80 characters
hgext/convert/cvsps.py:0:
> ui.write('Ancestors: %s\n' % (','.join(r)))
warning: unwrapped ui message
@@ -104,12 +80,6 @@
hgext/convert/git.py:0:
> except:
warning: naked except clause
- hgext/convert/git.py:0:
- > fh = self.gitopen('git diff-tree --name-only --root -r %s "%s^%s" --'
- warning: line over 80 characters
- hgext/convert/hg.py:0:
- > # detect missing revlogs and abort on errors or populate self.ignored
- warning: line over 80 characters
hgext/convert/hg.py:0:
> except:
warning: naked except clause
@@ -124,27 +94,11 @@
> except:
warning: naked except clause
hgext/convert/subversion.py:0:
- > raise util.Abort(_('svn: branch has no revision %s') % to_revnum)
- warning: line over 80 characters
- hgext/convert/subversion.py:0:
> except:
warning: naked except clause
hgext/convert/subversion.py:0:
- > args = [self.baseurl, relpaths, start, end, limit, discover_changed_paths,
- warning: line over 80 characters
- hgext/convert/subversion.py:0:
- > self.trunkname = self.ui.config('convert', 'svn.trunk', 'trunk').strip('/')
- warning: line over 80 characters
- hgext/convert/subversion.py:0:
> except:
warning: naked except clause
- hgext/convert/subversion.py:0:
- > def get_log_child(fp, url, paths, start, end, limit=0, discover_changed_paths=True,
- warning: line over 80 characters
- hgext/eol.py:0:
- > if ui.configbool('eol', 'fix-trailing-newline', False) and s and s[-1] != '\n':
- warning: line over 80 characters
- warning: line over 80 characters
hgext/gpg.py:0:
> except:
warning: naked except clause
@@ -152,9 +106,6 @@
> except:
warning: naked except clause
hgext/hgk.py:0:
- > ui.write("%s%s\n" % (prefix, description.replace('\n', nlprefix).strip()))
- warning: line over 80 characters
- hgext/hgk.py:0:
> ui.write("parent %s\n" % p)
warning: unwrapped ui message
hgext/hgk.py:0:
@@ -173,18 +124,8 @@
> ui.write("revision %d\n" % ctx.rev())
warning: unwrapped ui message
hgext/hgk.py:0:
- > ui.write("tree %s\n" % short(ctx.changeset()[0])) # use ctx.node() instead ??
- warning: line over 80 characters
+ > ui.write("tree %s\n" % short(ctx.changeset()[0]))
warning: unwrapped ui message
- hgext/highlight/__init__.py:0:
- > extensions.wrapfunction(webcommands, '_filerevision', filerevision_highlight)
- warning: line over 80 characters
- hgext/highlight/__init__.py:0:
- > return ['/* pygments_style = %s */\n\n' % pg_style, fmter.get_style_defs('')]
- warning: line over 80 characters
- hgext/inotify/__init__.py:0:
- > if self._inotifyon and not ignored and not subrepos and not self._dirty:
- warning: line over 80 characters
hgext/inotify/server.py:0:
> except:
warning: naked except clause
@@ -195,15 +136,6 @@
> ui.note("hg ci -m '%s'\n" % msg)
warning: unwrapped ui message
hgext/mq.py:0:
- > raise util.Abort(_("cannot push --exact with applied patches"))
- warning: line over 80 characters
- hgext/mq.py:0:
- > raise util.Abort(_("cannot use --exact and --move together"))
- warning: line over 80 characters
- hgext/mq.py:0:
- > self.ui.warn(_('Tag %s overrides mq patch of the same name\n')
- warning: line over 80 characters
- hgext/mq.py:0:
> except:
warning: naked except clause
warning: naked except clause
@@ -214,32 +146,11 @@
warning: naked except clause
warning: naked except clause
hgext/mq.py:0:
- > raise util.Abort(_('cannot mix -l/--list with options or arguments'))
- warning: line over 80 characters
- hgext/mq.py:0:
- > raise util.Abort(_('qfold cannot fold already applied patch %s') % p)
- warning: line over 80 characters
- hgext/mq.py:0:
- > ('U', 'noupdate', None, _('do not update the new working directories')),
- warning: line over 80 characters
- hgext/mq.py:0:
- > ('e', 'exact', None, _('apply the target patch to its recorded parent')),
- warning: line over 80 characters
- hgext/mq.py:0:
> except:
warning: naked except clause
hgext/mq.py:0:
> ui.write("mq: %s\n" % ', '.join(m))
warning: unwrapped ui message
- hgext/mq.py:0:
- > repo.mq.qseries(repo, missing=opts.get('missing'), summary=opts.get('summary'))
- warning: line over 80 characters
- hgext/notify.py:0:
- > ui.note(_('notify: suppressing notification for merge %d:%s\n') %
- warning: line over 80 characters
- hgext/patchbomb.py:0:
- > binnode, seqno=idx, total=total)
- warning: line over 80 characters
hgext/patchbomb.py:0:
> except:
warning: naked except clause
@@ -247,39 +158,12 @@
> ui.write('Subject: %s\n' % subj)
warning: unwrapped ui message
hgext/patchbomb.py:0:
- > p = mail.mimetextpatch('\n'.join(patchlines), 'x-patch', opts.get('test'))
- warning: line over 80 characters
- hgext/patchbomb.py:0:
> ui.write('From: %s\n' % sender)
warning: unwrapped ui message
- hgext/record.py:0:
- > ignoreblanklines=opts.get('ignore_blank_lines'))
- warning: line over 80 characters
- hgext/record.py:0:
- > ignorewsamount=opts.get('ignore_space_change'),
- warning: line over 80 characters
- hgext/zeroconf/__init__.py:0:
- > publish(name, desc, path, util.getport(u.config("web", "port", 8000)))
- warning: line over 80 characters
hgext/zeroconf/__init__.py:0:
> except:
warning: naked except clause
warning: naked except clause
- mercurial/bundlerepo.py:0:
- > is a bundlerepo for the obtained bundle when the original "other" is remote.
- warning: line over 80 characters
- mercurial/bundlerepo.py:0:
- > "local" is a local repo from which to obtain the actual incoming changesets; it
- warning: line over 80 characters
- mercurial/bundlerepo.py:0:
- > tmp = discovery.findcommonincoming(repo, other, heads=onlyheads, force=force)
- warning: line over 80 characters
- mercurial/commands.py:0:
- > " size " + basehdr + " link p1 p2 nodeid\n")
- warning: line over 80 characters
- mercurial/commands.py:0:
- > raise util.Abort('cannot use localheads with old style discovery')
- warning: line over 80 characters
mercurial/commands.py:0:
> ui.note('branch %s\n' % data)
warning: unwrapped ui message
@@ -293,18 +177,9 @@
> ui.write("unpruned common: %s\n" % " ".join([short(n)
warning: unwrapped ui message
mercurial/commands.py:0:
- > yield 'n', (r, list(set(p for p in cl.parentrevs(r) if p != -1)))
- warning: line over 80 characters
- mercurial/commands.py:0:
- > yield 'n', (r, list(set(p for p in rlog.parentrevs(r) if p != -1)))
- warning: line over 80 characters
- mercurial/commands.py:0:
> except:
warning: naked except clause
mercurial/commands.py:0:
- > ui.status(_("(run 'hg heads .' to see heads, 'hg merge' to merge)\n"))
- warning: line over 80 characters
- mercurial/commands.py:0:
> ui.write("format: id, p1, p2, cset, delta base, len(delta)\n")
warning: unwrapped ui message
mercurial/commands.py:0:
@@ -314,17 +189,7 @@
> ui.write("remote is subset\n")
warning: unwrapped ui message
mercurial/commands.py:0:
- > ui.write(' other : ' + fmt2 % pcfmt(numoprev, numprev))
- warning: line over 80 characters
- mercurial/commands.py:0:
- > ui.write(' where prev = p1 : ' + fmt2 % pcfmt(nump1prev, numprev))
- warning: line over 80 characters
- mercurial/commands.py:0:
- > ui.write(' where prev = p2 : ' + fmt2 % pcfmt(nump2prev, numprev))
- warning: line over 80 characters
- mercurial/commands.py:0:
- > ui.write('deltas against other : ' + fmt % pcfmt(numother, numdeltas))
- warning: line over 80 characters
+ > ui.write('deltas against other : ' + fmt % pcfmt(numother,
warning: unwrapped ui message
mercurial/commands.py:0:
> ui.write('deltas against p1 : ' + fmt % pcfmt(nump1, numdeltas))
@@ -336,9 +201,6 @@
> except:
warning: naked except clause
mercurial/commands.py:0:
- > revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev'))
- warning: line over 80 characters
- mercurial/commands.py:0:
> ui.write("common heads: %s\n" % " ".join([short(n) for n in common]))
warning: unwrapped ui message
mercurial/commands.py:0:
@@ -354,12 +216,6 @@
> ui.write('uncompressed data size (min/max/avg) : %d / %d / %d\n'
warning: unwrapped ui message
mercurial/commands.py:0:
- > Every ID must be a full-length hex node id string. Returns a list of 0s and 1s
- warning: line over 80 characters
- mercurial/commands.py:0:
- > remoteurl, branches = hg.parseurl(ui.expandpath(remoteurl), opts.get('branch'))
- warning: line over 80 characters
- mercurial/commands.py:0:
> ui.write("digraph G {\n")
warning: unwrapped ui message
mercurial/commands.py:0:
@@ -402,48 +258,15 @@
mercurial/commands.py:0:
> ui.write('symlink: %s\n' % (util.checklink(path) and 'yes' or 'no'))
warning: unwrapped ui message
- mercurial/commandserver.py:0:
- > # the ui here is really the repo ui so take its baseui so we don't end up
- warning: line over 80 characters
- mercurial/context.py:0:
- > return self._manifestdelta[path], self._manifestdelta.flags(path)
- warning: line over 80 characters
- mercurial/dagparser.py:0:
- > raise util.Abort(_("invalid character in dag description: %s...") % s)
- warning: line over 80 characters
- mercurial/dagparser.py:0:
- > >>> dagtext([('n', (0, [-1])), ('C', 'my command line'), ('n', (1, [0]))])
- warning: line over 80 characters
- mercurial/dirstate.py:0:
- > if not st is None and not getkind(st.st_mode) in (regkind, lnkkind):
- warning: line over 80 characters
- mercurial/discovery.py:0:
- > If onlyheads is given, only nodes ancestral to nodes in onlyheads (inclusive)
- warning: line over 80 characters
- mercurial/discovery.py:0:
- > def findcommonoutgoing(repo, other, onlyheads=None, force=False, commoninc=None):
- warning: line over 80 characters
- mercurial/dispatch.py:0:
- > " (.hg not found)") % os.getcwd())
- warning: line over 80 characters
mercurial/dispatch.py:0:
> except:
warning: naked except clause
mercurial/dispatch.py:0:
- > return lambda: runcommand(lui, None, cmd, args[:1], ui, options, d, [], {})
- warning: line over 80 characters
- mercurial/dispatch.py:0:
- > def __init__(self, args, ui=None, repo=None, fin=None, fout=None, ferr=None):
- warning: line over 80 characters
- mercurial/dispatch.py:0:
> except:
warning: naked except clause
mercurial/hg.py:0:
> except:
warning: naked except clause
- mercurial/hgweb/hgweb_mod.py:0:
- > self.maxshortchanges = int(self.config("web", "maxshortchanges", 60))
- warning: line over 80 characters
mercurial/keepalive.py:0:
> except:
warning: naked except clause
@@ -451,105 +274,23 @@
> except:
warning: naked except clause
mercurial/localrepo.py:0:
- > # we return an integer indicating remote head count change
- warning: line over 80 characters
- mercurial/localrepo.py:0:
- > raise util.Abort(_("empty or missing revlog for %s") % fname)
- warning: line over 80 characters
- warning: line over 80 characters
- mercurial/localrepo.py:0:
- > if self._tagscache.tagtypes and name in self._tagscache.tagtypes:
- warning: line over 80 characters
- mercurial/localrepo.py:0:
- > self.hook("precommit", throw=True, parent1=hookp1, parent2=hookp2)
- warning: line over 80 characters
- mercurial/localrepo.py:0:
- > # new requirements = old non-format requirements + new format-related
- warning: line over 80 characters
- mercurial/localrepo.py:0:
> except:
warning: naked except clause
- mercurial/localrepo.py:0:
- > """return status of files between two nodes or node and working directory
- warning: line over 80 characters
- mercurial/localrepo.py:0:
- > '''Returns a tagscache object that contains various tags related caches.'''
- warning: line over 80 characters
- mercurial/manifest.py:0:
- > return "".join(struct.pack(">lll", start, end, len(content)) + content
- warning: line over 80 characters
- mercurial/merge.py:0:
- > subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx), overwrite)
- warning: line over 80 characters
- mercurial/patch.py:0:
- > modified, added, removed, copy, getfilectx, opts, losedata, prefix)
- warning: line over 80 characters
- mercurial/patch.py:0:
- > diffhelpers.addlines(lr, self.hunk, self.lena, self.lenb, self.a, self.b)
- warning: line over 80 characters
- mercurial/patch.py:0:
- > output.append(_(' %d files changed, %d insertions(+), %d deletions(-)\n')
- warning: line over 80 characters
mercurial/patch.py:0:
> except:
warning: naked except clause
- mercurial/pure/mpatch.py:0:
- > frags.extend(reversed(new)) # what was left at the end
- warning: line over 80 characters
mercurial/repair.py:0:
> except:
warning: naked except clause
mercurial/repair.py:0:
> except:
warning: naked except clause
- mercurial/revset.py:0:
- > elif c.isalnum() or c in '._' or ord(c) > 127: # gather up a symbol/keyword
- warning: line over 80 characters
- mercurial/revset.py:0:
- > Changesets that are the Nth ancestor (first parents only) of a changeset in set.
- warning: line over 80 characters
- mercurial/scmutil.py:0:
- > raise util.Abort(_("path '%s' is inside nested repo %r") %
- warning: line over 80 characters
- mercurial/scmutil.py:0:
- > "requires features '%s' (upgrade Mercurial)") % "', '".join(missings))
- warning: line over 80 characters
- mercurial/scmutil.py:0:
- > elif repo.dirstate[abs] != 'r' and (not good or not os.path.lexists(target)
- warning: line over 80 characters
- mercurial/setdiscovery.py:0:
- > # treat remote heads (and maybe own heads) as a first implicit sample response
- warning: line over 80 characters
- mercurial/setdiscovery.py:0:
- > undecided = dag.nodeset() # own nodes where I don't know if remote knows them
- warning: line over 80 characters
- mercurial/similar.py:0:
- > repo.ui.progress(_('searching for similar files'), i, total=len(removed))
- warning: line over 80 characters
- mercurial/simplemerge.py:0:
- > for zmatch, zend, amatch, aend, bmatch, bend in self.find_sync_regions():
- warning: line over 80 characters
- mercurial/sshrepo.py:0:
- > self._abort(error.RepoError(_("no suitable response from remote hg")))
- warning: line over 80 characters
mercurial/sshrepo.py:0:
> except:
warning: naked except clause
- mercurial/subrepo.py:0:
- > other, self._repo = hg.clone(self._repo._subparent.ui, {}, other,
- warning: line over 80 characters
- mercurial/subrepo.py:0:
- > msg = (_(' subrepository sources for %s differ (in checked out version)\n'
- warning: line over 80 characters
mercurial/transaction.py:0:
> except:
warning: naked except clause
- mercurial/ui.py:0:
- > traceback.print_exception(exc[0], exc[1], exc[2], file=self.ferr)
- warning: line over 80 characters
- mercurial/url.py:0:
- > conn = httpsconnection(host, port, keyfile, certfile, *args, **kwargs)
- warning: line over 80 characters
mercurial/util.py:0:
> except:
warning: naked except clause
@@ -562,35 +303,14 @@
mercurial/verify.py:0:
> except:
warning: naked except clause
- mercurial/wireproto.py:0:
- > # Assuming the future to be filled with the result from the batched request
- warning: line over 80 characters
- mercurial/wireproto.py:0:
- > '''remote must support _submitbatch(encbatch) and _submitone(op, encargs)'''
- warning: line over 80 characters
- mercurial/wireproto.py:0:
- > All methods invoked on instances of this class are simply queued and return a
- warning: line over 80 characters
- mercurial/wireproto.py:0:
- > The decorator returns a function which wraps this coroutine as a plain method,
- warning: line over 80 characters
- setup.py:0:
- > raise SystemExit("Python headers are required to build Mercurial")
- warning: line over 80 characters
setup.py:0:
> except:
warning: naked except clause
setup.py:0:
- > # build_py), it will not find osutil & friends, thinking that those modules are
- warning: line over 80 characters
- setup.py:0:
> except:
warning: naked except clause
warning: naked except clause
setup.py:0:
- > isironpython = platform.python_implementation().lower().find("ironpython") != -1
- warning: line over 80 characters
- setup.py:0:
> except:
warning: naked except clause
warning: naked except clause
@@ -601,24 +321,12 @@
tests/run-tests.py:0:
> except:
warning: naked except clause
- tests/test-commandserver.py:0:
- > 'hooks.pre-identify=python:test-commandserver.hook', 'id'],
- warning: line over 80 characters
- tests/test-commandserver.py:0:
- > # the cached repo local hgrc contains ui.foo=bar, so showconfig should show it
- warning: line over 80 characters
- tests/test-commandserver.py:0:
- > print '%c, %r' % (ch, re.sub('encoding: [a-zA-Z0-9-]+', 'encoding: ***', data))
- warning: line over 80 characters
tests/test-convert-mtn.t:0:
> > function get_passphrase(keypair_id)
don't use 'function', use old style
tests/test-filecache.py:0:
> except:
warning: naked except clause
- tests/test-filecache.py:0:
- > if subprocess.call(['python', '%s/hghave' % os.environ['TESTDIR'], 'cacheable']):
- warning: line over 80 characters
tests/test-import-git.t:0:
> > Mc\${NkU|\`?^000jF3jhEB
^ must be quoted
@@ -635,9 +343,3 @@
tests/test-ui-color.py:0:
> testui.write('buffered\n')
warning: unwrapped ui message
- tests/test-walkrepo.py:0:
- > print "Found %d repositories when I should have found 2" % (len(reposet),)
- warning: line over 80 characters
- tests/test-walkrepo.py:0:
- > print "Found %d repositories when I should have found 3" % (len(reposet),)
- warning: line over 80 characters
--- a/tests/test-commandserver.py Fri May 11 18:41:04 2012 +0200
+++ b/tests/test-commandserver.py Sat May 12 15:54:54 2012 +0200
@@ -71,7 +71,8 @@
def hellomessage(server):
ch, data = readchannel(server)
# escaping python tests output not supported
- print '%c, %r' % (ch, re.sub('encoding: [a-zA-Z0-9-]+', 'encoding: ***', data))
+ print '%c, %r' % (ch, re.sub('encoding: [a-zA-Z0-9-]+', 'encoding: ***',
+ data))
# run an arbitrary command to make sure the next thing the server sends
# isn't part of the hello message
@@ -142,7 +143,8 @@
is used """
readchannel(server)
- # the cached repo local hgrc contains ui.foo=bar, so showconfig should show it
+ # the cached repo local hgrc contains ui.foo=bar, so showconfig should
+ # show it
runcommand(server, ['showconfig'])
# but not for this repo
@@ -157,7 +159,8 @@
def hookoutput(server):
readchannel(server)
runcommand(server, ['--config',
- 'hooks.pre-identify=python:test-commandserver.hook', 'id'],
+ 'hooks.pre-identify=python:test-commandserver.hook',
+ 'id'],
input=cStringIO.StringIO('some input'))
def outsidechanges(server):
--- a/tests/test-filecache.py Fri May 11 18:41:04 2012 +0200
+++ b/tests/test-filecache.py Sat May 12 15:54:54 2012 +0200
@@ -1,6 +1,7 @@
import sys, os, subprocess
-if subprocess.call(['python', '%s/hghave' % os.environ['TESTDIR'], 'cacheable']):
+if subprocess.call(['python', '%s/hghave' % os.environ['TESTDIR'],
+ 'cacheable']):
sys.exit(80)
from mercurial import util, scmutil, extensions
--- a/tests/test-walkrepo.py Fri May 11 18:41:04 2012 +0200
+++ b/tests/test-walkrepo.py Sat May 12 15:54:54 2012 +0200
@@ -24,10 +24,12 @@
reposet = frozenset(walkrepos('.', followsym=True))
if sym and (len(reposet) != 3):
print "reposet = %r" % (reposet,)
- print "Found %d repositories when I should have found 3" % (len(reposet),)
+ print ("Found %d repositories when I should have found 3"
+ % (len(reposet),))
if (not sym) and (len(reposet) != 2):
print "reposet = %r" % (reposet,)
- print "Found %d repositories when I should have found 2" % (len(reposet),)
+ print ("Found %d repositories when I should have found 2"
+ % (len(reposet),))
sub1set = frozenset((pjoin('.', 'sub1'),
pjoin('.', 'circle', 'subdir', 'sub1')))
if len(sub1set & reposet) != 1: