Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.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 | de2267517841 |
children | 4a02cf4fbb2e |
comparison
equal
deleted
inserted
replaced
16704:1f3acc30bdfe | 16705:c2d9ef43ff6c |
---|---|
3773 | 3773 |
3774 if tr: | 3774 if tr: |
3775 tr.close() | 3775 tr.close() |
3776 if msgs: | 3776 if msgs: |
3777 repo.savecommitmessage('\n* * *\n'.join(msgs)) | 3777 repo.savecommitmessage('\n* * *\n'.join(msgs)) |
3778 except: | 3778 except: # re-raises |
3779 # wlock.release() indirectly calls dirstate.write(): since | 3779 # wlock.release() indirectly calls dirstate.write(): since |
3780 # we're crashing, we do not want to change the working dir | 3780 # we're crashing, we do not want to change the working dir |
3781 # parent after all, so make sure it writes nothing | 3781 # parent after all, so make sure it writes nothing |
3782 repo.dirstate.invalidate() | 3782 repo.dirstate.invalidate() |
3783 raise | 3783 raise |