##// END OF EJS Templates
fix coding style (reported by pylint)
Benoit Boissinot -
r10394:4612cded default
parent child Browse files
Show More
@@ -170,7 +170,7 b' class bzr_source(converter_source):'
170 170 return changes
171 171
172 172 def _gettreechanges(self, current, origin):
173 revid = current._revision_id;
173 revid = current._revision_id
174 174 changes = []
175 175 renames = {}
176 176 for (fileid, paths, changed_content, versioned, parent, name,
@@ -172,7 +172,7 b' class gnuarch_source(converter_source, c'
172 172
173 173 for src in self.changes[rev].ren_dirs:
174 174 to = self.changes[rev].ren_dirs[src]
175 chgs, cps = self._rendirchanges(src, to);
175 chgs, cps = self._rendirchanges(src, to)
176 176 changes += [(f, rev) for f in chgs]
177 177 copies.update(cps)
178 178
@@ -126,7 +126,7 b' def dodiff(ui, repo, diffcmd, diffopts, '
126 126 modadd = mod_a | add_a | mod_b | add_b
127 127 common = modadd | rem_a | rem_b
128 128 if not common:
129 return 0
129 return 0
130 130
131 131 tmproot = tempfile.mkdtemp(prefix='extdiff.')
132 132 try:
@@ -90,7 +90,7 b' def sigwalk(repo):'
90 90 if not l:
91 91 continue
92 92 yield (l.split(" ", 2), (context, ln))
93 ln +=1
93 ln += 1
94 94
95 95 # read the heads
96 96 fl = repo.file(".hgsigs")
@@ -92,7 +92,7 b' def difftree(ui, repo, node1=None, node2'
92 92 break
93 93
94 94 def catcommit(ui, repo, n, prefix, ctx=None):
95 nlprefix = '\n' + prefix;
95 nlprefix = '\n' + prefix
96 96 if ctx is None:
97 97 ctx = repo[n]
98 98 ui.write("tree %s\n" % short(ctx.changeset()[0])) # use ctx.node() instead ??
@@ -135,7 +135,7 b' def catfile(ui, repo, type=None, r=None,'
135 135 prefix = ""
136 136 if opts['stdin']:
137 137 try:
138 (type, r) = raw_input().split(' ');
138 (type, r) = raw_input().split(' ')
139 139 prefix = " "
140 140 except EOFError:
141 141 return
@@ -148,12 +148,12 b' def catfile(ui, repo, type=None, r=None,'
148 148 while r:
149 149 if type != "commit":
150 150 ui.warn(_("aborting hg cat-file only understands commits\n"))
151 return 1;
151 return 1
152 152 n = repo.lookup(r)
153 153 catcommit(ui, repo, n, prefix)
154 154 if opts['stdin']:
155 155 try:
156 (type, r) = raw_input().split(' ');
156 (type, r) = raw_input().split(' ')
157 157 except EOFError:
158 158 break
159 159 else:
@@ -220,8 +220,8 b' def revtree(ui, args, repo, full="tree",'
220 220
221 221 # calculate the graph for the supplied commits
222 222 for i, n in enumerate(want_sha1):
223 reachable.append(set());
224 visit = [n];
223 reachable.append(set())
224 visit = [n]
225 225 reachable[i].add(n)
226 226 while visit:
227 227 n = visit.pop(0)
@@ -9,7 +9,7 b''
9 9 # file to defer pygments loading and speedup extension setup.
10 10
11 11 from mercurial import demandimport
12 demandimport.ignore.extend(['pkgutil', 'pkg_resources', '__main__',])
12 demandimport.ignore.extend(['pkgutil', 'pkg_resources', '__main__'])
13 13 from mercurial import util, encoding
14 14
15 15 from pygments import highlight
@@ -552,7 +552,7 b' def transplant(ui, repo, *revs, **opts):'
552 552 tp.resume(repo, source, opts)
553 553 return
554 554
555 tf=tp.transplantfilter(repo, source, p1)
555 tf = tp.transplantfilter(repo, source, p1)
556 556 if opts.get('prune'):
557 557 prune = [source.lookup(r)
558 558 for r in cmdutil.revrange(source, opts.get('prune'))]
@@ -103,7 +103,7 b' def annotate(ui, repo, *pats, **opts):'
103 103 opts['number'] = 1
104 104
105 105 linenumber = opts.get('line_number') is not None
106 if (linenumber and (not opts.get('changeset')) and (not opts.get('number'))):
106 if linenumber and (not opts.get('changeset')) and (not opts.get('number')):
107 107 raise util.Abort(_('at least one of -n/-c is required for -l'))
108 108
109 109 funcmap = [func for op, func in opmap if opts.get(op)]
@@ -366,7 +366,7 b' class dirstate(object):'
366 366 def clear(self):
367 367 self._map = {}
368 368 if "_dirs" in self.__dict__:
369 delattr(self, "_dirs");
369 delattr(self, "_dirs")
370 370 self._copymap = {}
371 371 self._pl = [nullid, nullid]
372 372 self._dirty = True
@@ -10,7 +10,7 b' import os, re, time'
10 10 from mercurial.i18n import _
11 11 from mercurial import ui, hg, util, templater
12 12 from mercurial import error, encoding
13 from common import ErrorResponse, get_mtime, staticfile, paritygen,\
13 from common import ErrorResponse, get_mtime, staticfile, paritygen, \
14 14 get_contact, HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR
15 15 from hgweb_mod import hgweb
16 16 from request import wsgirequest
@@ -707,7 +707,7 b' def graph(web, req, tmpl):'
707 707
708 708 dag = graphmod.revisions(web.repo, rev, downrev)
709 709 tree = list(graphmod.colored(dag))
710 canvasheight = (len(tree) + 1) * bg_height - 27;
710 canvasheight = (len(tree) + 1) * bg_height - 27
711 711 data = []
712 712 for (id, type, ctx, vtx, edges) in tree:
713 713 if type != graphmod.CHANGESET:
@@ -550,10 +550,10 b' def safesend(self, str):'
550 550 if hasattr(str,'read') :
551 551 if self.debuglevel > 0:
552 552 print "sendIng a read()able"
553 data=str.read(blocksize)
553 data = str.read(blocksize)
554 554 while data:
555 555 self.sock.sendall(data)
556 data=str.read(blocksize)
556 data = str.read(blocksize)
557 557 else:
558 558 self.sock.sendall(str)
559 559 except socket.error, v:
@@ -178,7 +178,7 b' def showfileadds(**args):'
178 178 return showlist('file_add', getfiles(repo, ctx, revcache)[1], **args)
179 179
180 180 def showfilecopies(**args):
181 cache, ctx= args['cache'], args['ctx']
181 cache, ctx = args['cache'], args['ctx']
182 182 copies = args['revcache'].get('copies')
183 183 if copies is None:
184 184 if 'getrenamed' not in cache:
@@ -41,7 +41,7 b' class winstdout(object):'
41 41 limit = 16000
42 42 l = len(s)
43 43 start = 0
44 self.softspace = 0;
44 self.softspace = 0
45 45 while start < l:
46 46 end = start + limit
47 47 self.fp.write(s[start:end])
@@ -217,7 +217,6 b' def statfiles(files):'
217 217 '''Stat each file in files and yield stat or None if file does not exist.
218 218 Cluster and cache stat per directory to minimize number of OS stat calls.'''
219 219 ncase = os.path.normcase
220 sep = os.sep
221 220 dircache = {} # dirname -> filename -> status | None if file does not exist
222 221 for nf in files:
223 222 nf = ncase(nf)
General Comments 0
You need to be logged in to leave comments. Login now