Mercurial > public > mercurial-scm > hg
comparison contrib/shrink-revlog.py @ 16705:c2d9ef43ff6c
check-code: ignore naked excepts with a "re-raise" comment
This also promotes the naked except check from a warning to an error.
author | Brodie Rao <brodie@sf.io> |
---|---|
date | Sun, 13 May 2012 13:18:06 +0200 |
parents | d76b9abd1509 |
children | d6d0f1ed8ebb |
comparison
equal
deleted
inserted
replaced
16704:1f3acc30bdfe | 16705:c2d9ef43ff6c |
---|---|
238 ui.note(_('%d suboptimal nodes\n') % suboptimal) | 238 ui.note(_('%d suboptimal nodes\n') % suboptimal) |
239 | 239 |
240 writerevs(ui, r1, r2, order, tr) | 240 writerevs(ui, r1, r2, order, tr) |
241 report(ui, r1, r2) | 241 report(ui, r1, r2) |
242 tr.close() | 242 tr.close() |
243 except: | 243 except: # re-raises |
244 # Abort transaction first, so we truncate the files before | 244 # Abort transaction first, so we truncate the files before |
245 # deleting them. | 245 # deleting them. |
246 tr.abort() | 246 tr.abort() |
247 for fn in (tmpindexfn, tmpdatafn): | 247 for fn in (tmpindexfn, tmpdatafn): |
248 ignoremissing(os.unlink)(fn) | 248 ignoremissing(os.unlink)(fn) |