comparison mercurial/localrepo.py @ 3072:bc3fe3b5b785

Never apply string formatting to generated errors with util.Abort. Otherwise error messages containing % chars yield errors or worse. Fixed (hopefully) all users of util.Abort.
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 08 Sep 2006 09:36:18 +0200
parents 4d0e0f149581
children 4c9fcb5e3b82
comparison
equal deleted inserted replaced
3071:547d1a4aa105 3072:bc3fe3b5b785
131 except (KeyboardInterrupt, util.SignalInterrupt): 131 except (KeyboardInterrupt, util.SignalInterrupt):
132 raise 132 raise
133 except Exception, exc: 133 except Exception, exc:
134 if isinstance(exc, util.Abort): 134 if isinstance(exc, util.Abort):
135 self.ui.warn(_('error: %s hook failed: %s\n') % 135 self.ui.warn(_('error: %s hook failed: %s\n') %
136 (hname, exc.args[0] % exc.args[1:])) 136 (hname, exc.args[0]))
137 else: 137 else:
138 self.ui.warn(_('error: %s hook raised an exception: ' 138 self.ui.warn(_('error: %s hook raised an exception: '
139 '%s\n') % (hname, exc)) 139 '%s\n') % (hname, exc))
140 if throw: 140 if throw:
141 raise 141 raise