Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/branchmap.py @ 32228:b98ee1a808bd
cleanup: remove useless re-raises of KeyboardInterrupt
KeyboardInterrupt is no longer a subclass of Exception since Python 2.5.
https://docs.python.org/2/whatsnew/2.5.html#pep-352-exceptions-as-new-style-classes
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 03 May 2017 11:16:55 +0900 |
parents | a369482e9649 |
children | c34532365b38 |
comparison
equal
deleted
inserted
replaced
32227:2daba41c3b80 | 32228:b98ee1a808bd |
---|---|
65 if not cl.hasnode(node): | 65 if not cl.hasnode(node): |
66 raise ValueError('node %s does not exist' % hex(node)) | 66 raise ValueError('node %s does not exist' % hex(node)) |
67 partial.setdefault(label, []).append(node) | 67 partial.setdefault(label, []).append(node) |
68 if state == 'c': | 68 if state == 'c': |
69 partial._closednodes.add(node) | 69 partial._closednodes.add(node) |
70 except KeyboardInterrupt: | |
71 raise | |
72 except Exception as inst: | 70 except Exception as inst: |
73 if repo.ui.debugflag: | 71 if repo.ui.debugflag: |
74 msg = 'invalid branchheads cache' | 72 msg = 'invalid branchheads cache' |
75 if repo.filtername is not None: | 73 if repo.filtername is not None: |
76 msg += ' (%s)' % repo.filtername | 74 msg += ' (%s)' % repo.filtername |