##// END OF EJS Templates
pure/base85: align exception type/msg on base85.c...
Patrick Mezard -
r16598:20a9d823 stable
parent child Browse files
Show More
@@ -1,74 +1,75 b''
1 1 # base85.py: pure python base85 codec
2 2 #
3 3 # Copyright (C) 2009 Brendan Cully <brendan@kublai.com>
4 4 #
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2 or any later version.
7 7
8 8 import struct
9 9
10 10 _b85chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" \
11 11 "abcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~"
12 12 _b85chars2 = [(a + b) for a in _b85chars for b in _b85chars]
13 13 _b85dec = {}
14 14
15 15 def _mkb85dec():
16 16 for i, c in enumerate(_b85chars):
17 17 _b85dec[c] = i
18 18
19 19 def b85encode(text, pad=False):
20 20 """encode text in base85 format"""
21 21 l = len(text)
22 22 r = l % 4
23 23 if r:
24 24 text += '\0' * (4 - r)
25 25 longs = len(text) >> 2
26 26 words = struct.unpack('>%dL' % (longs), text)
27 27
28 28 out = ''.join(_b85chars[(word // 52200625) % 85] +
29 29 _b85chars2[(word // 7225) % 7225] +
30 30 _b85chars2[word % 7225]
31 31 for word in words)
32 32
33 33 if pad:
34 34 return out
35 35
36 36 # Trim padding
37 37 olen = l % 4
38 38 if olen:
39 39 olen += 1
40 40 olen += l // 4 * 5
41 41 return out[:olen]
42 42
43 43 def b85decode(text):
44 44 """decode base85-encoded text"""
45 45 if not _b85dec:
46 46 _mkb85dec()
47 47
48 48 l = len(text)
49 49 out = []
50 50 for i in range(0, len(text), 5):
51 51 chunk = text[i:i + 5]
52 52 acc = 0
53 53 for j, c in enumerate(chunk):
54 54 try:
55 55 acc = acc * 85 + _b85dec[c]
56 56 except KeyError:
57 raise TypeError('Bad base85 character at byte %d' % (i + j))
57 raise ValueError('bad base85 character at position %d'
58 % (i + j))
58 59 if acc > 4294967295:
59 raise OverflowError('Base85 overflow in hunk starting at byte %d' % i)
60 raise ValueError('Base85 overflow in hunk starting at byte %d' % i)
60 61 out.append(acc)
61 62
62 63 # Pad final chunk if necessary
63 64 cl = l % 5
64 65 if cl:
65 66 acc *= 85 ** (5 - cl)
66 67 if cl > 1:
67 68 acc += 0xffffff >> (cl - 2) * 8
68 69 out[-1] = acc
69 70
70 71 out = struct.pack('>%dL' % (len(out)), *out)
71 72 if cl:
72 73 out = out[:-(5 - cl)]
73 74
74 75 return out
@@ -1,636 +1,633 b''
1 1 $ check_code="$TESTDIR"/../contrib/check-code.py
2 2 $ cd "$TESTDIR"/..
3 3 $ if hg identify -q > /dev/null; then :
4 4 > else
5 5 > echo "skipped: not a Mercurial working dir" >&2
6 6 > exit 80
7 7 > fi
8 8 $ hg manifest | xargs "$check_code" || echo 'FAILURE IS NOT AN OPTION!!!'
9 9
10 10 $ hg manifest | xargs "$check_code" --warnings --nolineno --per-file=0 || true
11 11 contrib/check-code.py:0:
12 12 > # (r'^\s+[^_ \n][^_. \n]+_[^_\n]+\s*=', "don't use underbars in identifiers"),
13 13 warning: line over 80 characters
14 14 contrib/perf.py:0:
15 15 > except:
16 16 warning: naked except clause
17 17 contrib/perf.py:0:
18 18 > #timer(lambda: sum(map(len, repo.dirstate.status(m, [], False, False, False))))
19 19 warning: line over 80 characters
20 20 contrib/perf.py:0:
21 21 > except:
22 22 warning: naked except clause
23 23 contrib/setup3k.py:0:
24 24 > except:
25 25 warning: naked except clause
26 26 contrib/setup3k.py:0:
27 27 > except:
28 28 warning: naked except clause
29 29 contrib/setup3k.py:0:
30 30 > except:
31 31 warning: naked except clause
32 32 warning: naked except clause
33 33 warning: naked except clause
34 34 contrib/shrink-revlog.py:0:
35 35 > except:
36 36 warning: naked except clause
37 37 doc/gendoc.py:0:
38 38 > "together with Mercurial. Help for other extensions is available "
39 39 warning: line over 80 characters
40 40 hgext/bugzilla.py:0:
41 41 > raise util.Abort(_('cannot find bugzilla user id for %s or %s') %
42 42 warning: line over 80 characters
43 43 hgext/bugzilla.py:0:
44 44 > bzdir = self.ui.config('bugzilla', 'bzdir', '/var/www/html/bugzilla')
45 45 warning: line over 80 characters
46 46 hgext/convert/__init__.py:0:
47 47 > ('', 'ancestors', '', _('show current changeset in ancestor branches')),
48 48 warning: line over 80 characters
49 49 hgext/convert/bzr.py:0:
50 50 > except:
51 51 warning: naked except clause
52 52 hgext/convert/common.py:0:
53 53 > except:
54 54 warning: naked except clause
55 55 hgext/convert/common.py:0:
56 56 > except:
57 57 warning: naked except clause
58 58 warning: naked except clause
59 59 hgext/convert/convcmd.py:0:
60 60 > except:
61 61 warning: naked except clause
62 62 hgext/convert/cvs.py:0:
63 63 > # /1 :pserver:user@example.com:2401/cvsroot/foo Ah<Z
64 64 warning: line over 80 characters
65 65 hgext/convert/cvsps.py:0:
66 66 > assert len(branches) == 1, 'unknown branch: %s' % e.mergepoint
67 67 warning: line over 80 characters
68 68 hgext/convert/cvsps.py:0:
69 69 > ui.write('Ancestors: %s\n' % (','.join(r)))
70 70 warning: unwrapped ui message
71 71 hgext/convert/cvsps.py:0:
72 72 > ui.write('Parent: %d\n' % cs.parents[0].id)
73 73 warning: unwrapped ui message
74 74 hgext/convert/cvsps.py:0:
75 75 > ui.write('Parents: %s\n' %
76 76 warning: unwrapped ui message
77 77 hgext/convert/cvsps.py:0:
78 78 > except:
79 79 warning: naked except clause
80 80 hgext/convert/cvsps.py:0:
81 81 > ui.write('Branchpoints: %s \n' % ', '.join(branchpoints))
82 82 warning: unwrapped ui message
83 83 hgext/convert/cvsps.py:0:
84 84 > ui.write('Author: %s\n' % cs.author)
85 85 warning: unwrapped ui message
86 86 hgext/convert/cvsps.py:0:
87 87 > ui.write('Branch: %s\n' % (cs.branch or 'HEAD'))
88 88 warning: unwrapped ui message
89 89 hgext/convert/cvsps.py:0:
90 90 > ui.write('Date: %s\n' % util.datestr(cs.date,
91 91 warning: unwrapped ui message
92 92 hgext/convert/cvsps.py:0:
93 93 > ui.write('Log:\n')
94 94 warning: unwrapped ui message
95 95 hgext/convert/cvsps.py:0:
96 96 > ui.write('Members: \n')
97 97 warning: unwrapped ui message
98 98 hgext/convert/cvsps.py:0:
99 99 > ui.write('PatchSet %d \n' % cs.id)
100 100 warning: unwrapped ui message
101 101 hgext/convert/cvsps.py:0:
102 102 > ui.write('Tag%s: %s \n' % (['', 's'][len(cs.tags) > 1],
103 103 warning: unwrapped ui message
104 104 hgext/convert/git.py:0:
105 105 > except:
106 106 warning: naked except clause
107 107 hgext/convert/git.py:0:
108 108 > fh = self.gitopen('git diff-tree --name-only --root -r %s "%s^%s" --'
109 109 warning: line over 80 characters
110 110 hgext/convert/hg.py:0:
111 111 > # detect missing revlogs and abort on errors or populate self.ignored
112 112 warning: line over 80 characters
113 113 hgext/convert/hg.py:0:
114 114 > except:
115 115 warning: naked except clause
116 116 warning: naked except clause
117 117 hgext/convert/hg.py:0:
118 118 > except:
119 119 warning: naked except clause
120 120 hgext/convert/monotone.py:0:
121 121 > except:
122 122 warning: naked except clause
123 123 hgext/convert/monotone.py:0:
124 124 > except:
125 125 warning: naked except clause
126 126 hgext/convert/subversion.py:0:
127 127 > raise util.Abort(_('svn: branch has no revision %s') % to_revnum)
128 128 warning: line over 80 characters
129 129 hgext/convert/subversion.py:0:
130 130 > except:
131 131 warning: naked except clause
132 132 hgext/convert/subversion.py:0:
133 133 > args = [self.baseurl, relpaths, start, end, limit, discover_changed_paths,
134 134 warning: line over 80 characters
135 135 hgext/convert/subversion.py:0:
136 136 > self.trunkname = self.ui.config('convert', 'svn.trunk', 'trunk').strip('/')
137 137 warning: line over 80 characters
138 138 hgext/convert/subversion.py:0:
139 139 > except:
140 140 warning: naked except clause
141 141 hgext/convert/subversion.py:0:
142 142 > def get_log_child(fp, url, paths, start, end, limit=0, discover_changed_paths=True,
143 143 warning: line over 80 characters
144 144 hgext/eol.py:0:
145 145 > if ui.configbool('eol', 'fix-trailing-newline', False) and s and s[-1] != '\n':
146 146 warning: line over 80 characters
147 147 warning: line over 80 characters
148 148 hgext/gpg.py:0:
149 149 > except:
150 150 warning: naked except clause
151 151 hgext/hgcia.py:0:
152 152 > except:
153 153 warning: naked except clause
154 154 hgext/hgk.py:0:
155 155 > ui.write("%s%s\n" % (prefix, description.replace('\n', nlprefix).strip()))
156 156 warning: line over 80 characters
157 157 hgext/hgk.py:0:
158 158 > ui.write("parent %s\n" % p)
159 159 warning: unwrapped ui message
160 160 hgext/hgk.py:0:
161 161 > ui.write('k=%s\nv=%s\n' % (name, value))
162 162 warning: unwrapped ui message
163 163 hgext/hgk.py:0:
164 164 > ui.write("author %s %s %s\n" % (ctx.user(), int(date[0]), date[1]))
165 165 warning: unwrapped ui message
166 166 hgext/hgk.py:0:
167 167 > ui.write("branch %s\n\n" % ctx.branch())
168 168 warning: unwrapped ui message
169 169 hgext/hgk.py:0:
170 170 > ui.write("committer %s %s %s\n" % (committer, int(date[0]), date[1]))
171 171 warning: unwrapped ui message
172 172 hgext/hgk.py:0:
173 173 > ui.write("revision %d\n" % ctx.rev())
174 174 warning: unwrapped ui message
175 175 hgext/hgk.py:0:
176 176 > ui.write("tree %s\n" % short(ctx.changeset()[0])) # use ctx.node() instead ??
177 177 warning: line over 80 characters
178 178 warning: unwrapped ui message
179 179 hgext/highlight/__init__.py:0:
180 180 > extensions.wrapfunction(webcommands, '_filerevision', filerevision_highlight)
181 181 warning: line over 80 characters
182 182 hgext/highlight/__init__.py:0:
183 183 > return ['/* pygments_style = %s */\n\n' % pg_style, fmter.get_style_defs('')]
184 184 warning: line over 80 characters
185 185 hgext/inotify/__init__.py:0:
186 186 > if self._inotifyon and not ignored and not subrepos and not self._dirty:
187 187 warning: line over 80 characters
188 188 hgext/inotify/server.py:0:
189 189 > except:
190 190 warning: naked except clause
191 191 hgext/inotify/server.py:0:
192 192 > except:
193 193 warning: naked except clause
194 194 hgext/keyword.py:0:
195 195 > ui.note("hg ci -m '%s'\n" % msg)
196 196 warning: unwrapped ui message
197 197 hgext/mq.py:0:
198 198 > raise util.Abort(_("cannot push --exact with applied patches"))
199 199 warning: line over 80 characters
200 200 hgext/mq.py:0:
201 201 > raise util.Abort(_("cannot use --exact and --move together"))
202 202 warning: line over 80 characters
203 203 hgext/mq.py:0:
204 204 > self.ui.warn(_('Tag %s overrides mq patch of the same name\n')
205 205 warning: line over 80 characters
206 206 hgext/mq.py:0:
207 207 > except:
208 208 warning: naked except clause
209 209 warning: naked except clause
210 210 hgext/mq.py:0:
211 211 > except:
212 212 warning: naked except clause
213 213 warning: naked except clause
214 214 warning: naked except clause
215 215 warning: naked except clause
216 216 hgext/mq.py:0:
217 217 > raise util.Abort(_('cannot mix -l/--list with options or arguments'))
218 218 warning: line over 80 characters
219 219 hgext/mq.py:0:
220 220 > raise util.Abort(_('qfold cannot fold already applied patch %s') % p)
221 221 warning: line over 80 characters
222 222 hgext/mq.py:0:
223 223 > ('', 'move', None, _('reorder patch series and apply only the patch'))],
224 224 warning: line over 80 characters
225 225 hgext/mq.py:0:
226 226 > ('U', 'noupdate', None, _('do not update the new working directories')),
227 227 warning: line over 80 characters
228 228 hgext/mq.py:0:
229 229 > ('e', 'exact', None, _('apply the target patch to its recorded parent')),
230 230 warning: line over 80 characters
231 231 hgext/mq.py:0:
232 232 > except:
233 233 warning: naked except clause
234 234 hgext/mq.py:0:
235 235 > ui.write("mq: %s\n" % ', '.join(m))
236 236 warning: unwrapped ui message
237 237 hgext/mq.py:0:
238 238 > repo.mq.qseries(repo, missing=opts.get('missing'), summary=opts.get('summary'))
239 239 warning: line over 80 characters
240 240 hgext/notify.py:0:
241 241 > ui.note(_('notify: suppressing notification for merge %d:%s\n') %
242 242 warning: line over 80 characters
243 243 hgext/patchbomb.py:0:
244 244 > binnode, seqno=idx, total=total)
245 245 warning: line over 80 characters
246 246 hgext/patchbomb.py:0:
247 247 > except:
248 248 warning: naked except clause
249 249 hgext/patchbomb.py:0:
250 250 > ui.write('Subject: %s\n' % subj)
251 251 warning: unwrapped ui message
252 252 hgext/patchbomb.py:0:
253 253 > p = mail.mimetextpatch('\n'.join(patchlines), 'x-patch', opts.get('test'))
254 254 warning: line over 80 characters
255 255 hgext/patchbomb.py:0:
256 256 > ui.write('From: %s\n' % sender)
257 257 warning: unwrapped ui message
258 258 hgext/record.py:0:
259 259 > ignoreblanklines=opts.get('ignore_blank_lines'))
260 260 warning: line over 80 characters
261 261 hgext/record.py:0:
262 262 > ignorewsamount=opts.get('ignore_space_change'),
263 263 warning: line over 80 characters
264 264 hgext/zeroconf/__init__.py:0:
265 265 > publish(name, desc, path, util.getport(u.config("web", "port", 8000)))
266 266 warning: line over 80 characters
267 267 hgext/zeroconf/__init__.py:0:
268 268 > except:
269 269 warning: naked except clause
270 270 warning: naked except clause
271 271 mercurial/bundlerepo.py:0:
272 272 > is a bundlerepo for the obtained bundle when the original "other" is remote.
273 273 warning: line over 80 characters
274 274 mercurial/bundlerepo.py:0:
275 275 > "local" is a local repo from which to obtain the actual incoming changesets; it
276 276 warning: line over 80 characters
277 277 mercurial/bundlerepo.py:0:
278 278 > tmp = discovery.findcommonincoming(repo, other, heads=onlyheads, force=force)
279 279 warning: line over 80 characters
280 280 mercurial/commands.py:0:
281 281 > " size " + basehdr + " link p1 p2 nodeid\n")
282 282 warning: line over 80 characters
283 283 mercurial/commands.py:0:
284 284 > raise util.Abort('cannot use localheads with old style discovery')
285 285 warning: line over 80 characters
286 286 mercurial/commands.py:0:
287 287 > ui.note('branch %s\n' % data)
288 288 warning: unwrapped ui message
289 289 mercurial/commands.py:0:
290 290 > ui.note('node %s\n' % str(data))
291 291 warning: unwrapped ui message
292 292 mercurial/commands.py:0:
293 293 > ui.note('tag %s\n' % name)
294 294 warning: unwrapped ui message
295 295 mercurial/commands.py:0:
296 296 > ui.write("unpruned common: %s\n" % " ".join([short(n)
297 297 warning: unwrapped ui message
298 298 mercurial/commands.py:0:
299 299 > yield 'n', (r, list(set(p for p in cl.parentrevs(r) if p != -1)))
300 300 warning: line over 80 characters
301 301 mercurial/commands.py:0:
302 302 > yield 'n', (r, list(set(p for p in rlog.parentrevs(r) if p != -1)))
303 303 warning: line over 80 characters
304 304 mercurial/commands.py:0:
305 305 > except:
306 306 warning: naked except clause
307 307 mercurial/commands.py:0:
308 308 > ui.status(_("(run 'hg heads .' to see heads, 'hg merge' to merge)\n"))
309 309 warning: line over 80 characters
310 310 mercurial/commands.py:0:
311 311 > ui.write("format: id, p1, p2, cset, delta base, len(delta)\n")
312 312 warning: unwrapped ui message
313 313 mercurial/commands.py:0:
314 314 > ui.write("local is subset\n")
315 315 warning: unwrapped ui message
316 316 mercurial/commands.py:0:
317 317 > ui.write("remote is subset\n")
318 318 warning: unwrapped ui message
319 319 mercurial/commands.py:0:
320 320 > ui.write(' other : ' + fmt2 % pcfmt(numoprev, numprev))
321 321 warning: line over 80 characters
322 322 mercurial/commands.py:0:
323 323 > ui.write(' where prev = p1 : ' + fmt2 % pcfmt(nump1prev, numprev))
324 324 warning: line over 80 characters
325 325 mercurial/commands.py:0:
326 326 > ui.write(' where prev = p2 : ' + fmt2 % pcfmt(nump2prev, numprev))
327 327 warning: line over 80 characters
328 328 mercurial/commands.py:0:
329 329 > ui.write('deltas against other : ' + fmt % pcfmt(numother, numdeltas))
330 330 warning: line over 80 characters
331 331 warning: unwrapped ui message
332 332 mercurial/commands.py:0:
333 333 > ui.write('deltas against p1 : ' + fmt % pcfmt(nump1, numdeltas))
334 334 warning: unwrapped ui message
335 335 mercurial/commands.py:0:
336 336 > ui.write('deltas against p2 : ' + fmt % pcfmt(nump2, numdeltas))
337 337 warning: unwrapped ui message
338 338 mercurial/commands.py:0:
339 339 > except:
340 340 warning: naked except clause
341 341 mercurial/commands.py:0:
342 342 > revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev'))
343 343 warning: line over 80 characters
344 344 mercurial/commands.py:0:
345 345 > ui.write("common heads: %s\n" % " ".join([short(n) for n in common]))
346 346 warning: unwrapped ui message
347 347 mercurial/commands.py:0:
348 348 > ui.write("match: %s\n" % m(d[0]))
349 349 warning: unwrapped ui message
350 350 mercurial/commands.py:0:
351 351 > ui.write('deltas against prev : ' + fmt % pcfmt(numprev, numdeltas))
352 352 warning: unwrapped ui message
353 353 mercurial/commands.py:0:
354 354 > ui.write('path %s\n' % k)
355 355 warning: unwrapped ui message
356 356 mercurial/commands.py:0:
357 357 > ui.write('uncompressed data size (min/max/avg) : %d / %d / %d\n'
358 358 warning: unwrapped ui message
359 359 mercurial/commands.py:0:
360 360 > Every ID must be a full-length hex node id string. Returns a list of 0s and 1s
361 361 warning: line over 80 characters
362 362 mercurial/commands.py:0:
363 363 > remoteurl, branches = hg.parseurl(ui.expandpath(remoteurl), opts.get('branch'))
364 364 warning: line over 80 characters
365 365 mercurial/commands.py:0:
366 366 > ui.write("digraph G {\n")
367 367 warning: unwrapped ui message
368 368 mercurial/commands.py:0:
369 369 > ui.write("internal: %s %s\n" % d)
370 370 warning: unwrapped ui message
371 371 mercurial/commands.py:0:
372 372 > ui.write("standard: %s\n" % util.datestr(d))
373 373 warning: unwrapped ui message
374 374 mercurial/commands.py:0:
375 375 > ui.write('avg chain length : ' + fmt % avgchainlen)
376 376 warning: unwrapped ui message
377 377 mercurial/commands.py:0:
378 378 > ui.write('case-sensitive: %s\n' % (util.checkcase('.debugfsinfo')
379 379 warning: unwrapped ui message
380 380 mercurial/commands.py:0:
381 381 > ui.write('compression ratio : ' + fmt % compratio)
382 382 warning: unwrapped ui message
383 383 mercurial/commands.py:0:
384 384 > ui.write('delta size (min/max/avg) : %d / %d / %d\n'
385 385 warning: unwrapped ui message
386 386 mercurial/commands.py:0:
387 387 > ui.write('exec: %s\n' % (util.checkexec(path) and 'yes' or 'no'))
388 388 warning: unwrapped ui message
389 389 mercurial/commands.py:0:
390 390 > ui.write('flags : %s\n' % ', '.join(flags))
391 391 warning: unwrapped ui message
392 392 mercurial/commands.py:0:
393 393 > ui.write('format : %d\n' % format)
394 394 warning: unwrapped ui message
395 395 mercurial/commands.py:0:
396 396 > ui.write('full revision size (min/max/avg) : %d / %d / %d\n'
397 397 warning: unwrapped ui message
398 398 mercurial/commands.py:0:
399 399 > ui.write('revision size : ' + fmt2 % totalsize)
400 400 warning: unwrapped ui message
401 401 mercurial/commands.py:0:
402 402 > ui.write('revisions : ' + fmt2 % numrevs)
403 403 warning: unwrapped ui message
404 404 warning: unwrapped ui message
405 405 mercurial/commands.py:0:
406 406 > ui.write('symlink: %s\n' % (util.checklink(path) and 'yes' or 'no'))
407 407 warning: unwrapped ui message
408 408 mercurial/commandserver.py:0:
409 409 > # the ui here is really the repo ui so take its baseui so we don't end up
410 410 warning: line over 80 characters
411 411 mercurial/context.py:0:
412 412 > return self._manifestdelta[path], self._manifestdelta.flags(path)
413 413 warning: line over 80 characters
414 414 mercurial/dagparser.py:0:
415 415 > raise util.Abort(_("invalid character in dag description: %s...") % s)
416 416 warning: line over 80 characters
417 417 mercurial/dagparser.py:0:
418 418 > >>> dagtext([('n', (0, [-1])), ('C', 'my command line'), ('n', (1, [0]))])
419 419 warning: line over 80 characters
420 420 mercurial/dirstate.py:0:
421 421 > if not st is None and not getkind(st.st_mode) in (regkind, lnkkind):
422 422 warning: line over 80 characters
423 423 mercurial/discovery.py:0:
424 424 > If onlyheads is given, only nodes ancestral to nodes in onlyheads (inclusive)
425 425 warning: line over 80 characters
426 426 mercurial/discovery.py:0:
427 427 > def findcommonoutgoing(repo, other, onlyheads=None, force=False, commoninc=None):
428 428 warning: line over 80 characters
429 429 mercurial/dispatch.py:0:
430 430 > " (.hg not found)") % os.getcwd())
431 431 warning: line over 80 characters
432 432 mercurial/dispatch.py:0:
433 433 > except:
434 434 warning: naked except clause
435 435 mercurial/dispatch.py:0:
436 436 > return lambda: runcommand(lui, None, cmd, args[:1], ui, options, d, [], {})
437 437 warning: line over 80 characters
438 438 mercurial/dispatch.py:0:
439 439 > def __init__(self, args, ui=None, repo=None, fin=None, fout=None, ferr=None):
440 440 warning: line over 80 characters
441 441 mercurial/dispatch.py:0:
442 442 > except:
443 443 warning: naked except clause
444 444 mercurial/hg.py:0:
445 445 > except:
446 446 warning: naked except clause
447 447 mercurial/hgweb/hgweb_mod.py:0:
448 448 > self.maxshortchanges = int(self.config("web", "maxshortchanges", 60))
449 449 warning: line over 80 characters
450 450 mercurial/keepalive.py:0:
451 451 > except:
452 452 warning: naked except clause
453 453 mercurial/keepalive.py:0:
454 454 > except:
455 455 warning: naked except clause
456 456 mercurial/localrepo.py:0:
457 457 > # we return an integer indicating remote head count change
458 458 warning: line over 80 characters
459 459 mercurial/localrepo.py:0:
460 460 > raise util.Abort(_("empty or missing revlog for %s") % fname)
461 461 warning: line over 80 characters
462 462 warning: line over 80 characters
463 463 mercurial/localrepo.py:0:
464 464 > if self._tagscache.tagtypes and name in self._tagscache.tagtypes:
465 465 warning: line over 80 characters
466 466 mercurial/localrepo.py:0:
467 467 > self.hook("precommit", throw=True, parent1=hookp1, parent2=hookp2)
468 468 warning: line over 80 characters
469 469 mercurial/localrepo.py:0:
470 470 > # new requirements = old non-format requirements + new format-related
471 471 warning: line over 80 characters
472 472 mercurial/localrepo.py:0:
473 473 > except:
474 474 warning: naked except clause
475 475 mercurial/localrepo.py:0:
476 476 > """return status of files between two nodes or node and working directory
477 477 warning: line over 80 characters
478 478 mercurial/localrepo.py:0:
479 479 > '''Returns a tagscache object that contains various tags related caches.'''
480 480 warning: line over 80 characters
481 481 mercurial/manifest.py:0:
482 482 > return "".join(struct.pack(">lll", start, end, len(content)) + content
483 483 warning: line over 80 characters
484 484 mercurial/merge.py:0:
485 485 > subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx), overwrite)
486 486 warning: line over 80 characters
487 487 mercurial/patch.py:0:
488 488 > modified, added, removed, copy, getfilectx, opts, losedata, prefix)
489 489 warning: line over 80 characters
490 490 mercurial/patch.py:0:
491 491 > diffhelpers.addlines(lr, self.hunk, self.lena, self.lenb, self.a, self.b)
492 492 warning: line over 80 characters
493 493 mercurial/patch.py:0:
494 494 > output.append(_(' %d files changed, %d insertions(+), %d deletions(-)\n')
495 495 warning: line over 80 characters
496 496 mercurial/patch.py:0:
497 497 > except:
498 498 warning: naked except clause
499 mercurial/pure/base85.py:0:
500 > raise OverflowError('Base85 overflow in hunk starting at byte %d' % i)
501 warning: line over 80 characters
502 499 mercurial/pure/mpatch.py:0:
503 500 > frags.extend(reversed(new)) # what was left at the end
504 501 warning: line over 80 characters
505 502 mercurial/repair.py:0:
506 503 > except:
507 504 warning: naked except clause
508 505 mercurial/repair.py:0:
509 506 > except:
510 507 warning: naked except clause
511 508 mercurial/revset.py:0:
512 509 > elif c.isalnum() or c in '._' or ord(c) > 127: # gather up a symbol/keyword
513 510 warning: line over 80 characters
514 511 mercurial/revset.py:0:
515 512 > Changesets that are the Nth ancestor (first parents only) of a changeset in set.
516 513 warning: line over 80 characters
517 514 mercurial/scmutil.py:0:
518 515 > raise util.Abort(_("path '%s' is inside nested repo %r") %
519 516 warning: line over 80 characters
520 517 mercurial/scmutil.py:0:
521 518 > "requires features '%s' (upgrade Mercurial)") % "', '".join(missings))
522 519 warning: line over 80 characters
523 520 mercurial/scmutil.py:0:
524 521 > elif repo.dirstate[abs] != 'r' and (not good or not os.path.lexists(target)
525 522 warning: line over 80 characters
526 523 mercurial/setdiscovery.py:0:
527 524 > # treat remote heads (and maybe own heads) as a first implicit sample response
528 525 warning: line over 80 characters
529 526 mercurial/setdiscovery.py:0:
530 527 > undecided = dag.nodeset() # own nodes where I don't know if remote knows them
531 528 warning: line over 80 characters
532 529 mercurial/similar.py:0:
533 530 > repo.ui.progress(_('searching for similar files'), i, total=len(removed))
534 531 warning: line over 80 characters
535 532 mercurial/simplemerge.py:0:
536 533 > for zmatch, zend, amatch, aend, bmatch, bend in self.find_sync_regions():
537 534 warning: line over 80 characters
538 535 mercurial/sshrepo.py:0:
539 536 > self._abort(error.RepoError(_("no suitable response from remote hg")))
540 537 warning: line over 80 characters
541 538 mercurial/sshrepo.py:0:
542 539 > except:
543 540 warning: naked except clause
544 541 mercurial/subrepo.py:0:
545 542 > other, self._repo = hg.clone(self._repo._subparent.ui, {}, other,
546 543 warning: line over 80 characters
547 544 mercurial/subrepo.py:0:
548 545 > msg = (_(' subrepository sources for %s differ (in checked out version)\n'
549 546 warning: line over 80 characters
550 547 mercurial/transaction.py:0:
551 548 > except:
552 549 warning: naked except clause
553 550 mercurial/ui.py:0:
554 551 > traceback.print_exception(exc[0], exc[1], exc[2], file=self.ferr)
555 552 warning: line over 80 characters
556 553 mercurial/url.py:0:
557 554 > conn = httpsconnection(host, port, keyfile, certfile, *args, **kwargs)
558 555 warning: line over 80 characters
559 556 mercurial/util.py:0:
560 557 > except:
561 558 warning: naked except clause
562 559 mercurial/util.py:0:
563 560 > except:
564 561 warning: naked except clause
565 562 mercurial/verify.py:0:
566 563 > except:
567 564 warning: naked except clause
568 565 mercurial/verify.py:0:
569 566 > except:
570 567 warning: naked except clause
571 568 mercurial/wireproto.py:0:
572 569 > # Assuming the future to be filled with the result from the batched request
573 570 warning: line over 80 characters
574 571 mercurial/wireproto.py:0:
575 572 > '''remote must support _submitbatch(encbatch) and _submitone(op, encargs)'''
576 573 warning: line over 80 characters
577 574 mercurial/wireproto.py:0:
578 575 > All methods invoked on instances of this class are simply queued and return a
579 576 warning: line over 80 characters
580 577 mercurial/wireproto.py:0:
581 578 > The decorator returns a function which wraps this coroutine as a plain method,
582 579 warning: line over 80 characters
583 580 setup.py:0:
584 581 > raise SystemExit("Python headers are required to build Mercurial")
585 582 warning: line over 80 characters
586 583 setup.py:0:
587 584 > except:
588 585 warning: naked except clause
589 586 setup.py:0:
590 587 > # build_py), it will not find osutil & friends, thinking that those modules are
591 588 warning: line over 80 characters
592 589 setup.py:0:
593 590 > except:
594 591 warning: naked except clause
595 592 warning: naked except clause
596 593 setup.py:0:
597 594 > isironpython = platform.python_implementation().lower().find("ironpython") != -1
598 595 warning: line over 80 characters
599 596 setup.py:0:
600 597 > except:
601 598 warning: naked except clause
602 599 warning: naked except clause
603 600 warning: naked except clause
604 601 tests/autodiff.py:0:
605 602 > ui.write('data lost for: %s\n' % fn)
606 603 warning: unwrapped ui message
607 604 tests/run-tests.py:0:
608 605 > except:
609 606 warning: naked except clause
610 607 tests/test-commandserver.py:0:
611 608 > 'hooks.pre-identify=python:test-commandserver.hook', 'id'],
612 609 warning: line over 80 characters
613 610 tests/test-commandserver.py:0:
614 611 > # the cached repo local hgrc contains ui.foo=bar, so showconfig should show it
615 612 warning: line over 80 characters
616 613 tests/test-commandserver.py:0:
617 614 > print '%c, %r' % (ch, re.sub('encoding: [a-zA-Z0-9-]+', 'encoding: ***', data))
618 615 warning: line over 80 characters
619 616 tests/test-filecache.py:0:
620 617 > except:
621 618 warning: naked except clause
622 619 tests/test-filecache.py:0:
623 620 > if subprocess.call(['python', '%s/hghave' % os.environ['TESTDIR'], 'cacheable']):
624 621 warning: line over 80 characters
625 622 tests/test-ui-color.py:0:
626 623 > testui.warn('warning\n')
627 624 warning: unwrapped ui message
628 625 tests/test-ui-color.py:0:
629 626 > testui.write('buffered\n')
630 627 warning: unwrapped ui message
631 628 tests/test-walkrepo.py:0:
632 629 > print "Found %d repositories when I should have found 2" % (len(reposet),)
633 630 warning: line over 80 characters
634 631 tests/test-walkrepo.py:0:
635 632 > print "Found %d repositories when I should have found 3" % (len(reposet),)
636 633 warning: line over 80 characters
General Comments 0
You need to be logged in to leave comments. Login now