Mercurial > hg
changeset 8206:cce63ef1045b
ui: print_exc() -> traceback()
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 26 Apr 2009 16:50:44 -0500 |
parents | 00736cd2702a |
children | dd8d5be57d65 |
files | hgext/convert/hg.py hgext/convert/subversion.py hgext/inotify/__init__.py mercurial/dispatch.py mercurial/extensions.py mercurial/hook.py mercurial/httprepo.py mercurial/ui.py |
diffstat | 8 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/hg.py Sun Apr 26 16:50:44 2009 -0500 +++ b/hgext/convert/hg.py Sun Apr 26 16:50:44 2009 -0500 @@ -33,7 +33,7 @@ if not self.repo.local(): raise NoRepo(_('%s is not a local Mercurial repo') % path) except error.RepoError, err: - ui.print_exc() + ui.traceback() raise NoRepo(err.args[0]) else: try: @@ -43,7 +43,7 @@ raise NoRepo(_('%s is not a local Mercurial repo') % path) self.created.append(path) except error.RepoError: - ui.print_exc() + ui.traceback() raise NoRepo("could not create hg repo %s as sink" % path) self.lock = None self.wlock = None @@ -199,7 +199,7 @@ if not self.repo.local(): raise error.RepoError() except error.RepoError: - ui.print_exc() + ui.traceback() raise NoRepo("%s is not a local Mercurial repo" % path) self.lastrev = None self.lastctx = None
--- a/hgext/convert/subversion.py Sun Apr 26 16:50:44 2009 -0500 +++ b/hgext/convert/subversion.py Sun Apr 26 16:50:44 2009 -0500 @@ -233,7 +233,7 @@ self.paths = {} self.uuid = svn.ra.get_uuid(self.ra).decode(self.encoding) except SubversionException: - ui.print_exc() + ui.traceback() raise NoRepo("%s does not look like a Subversion repo" % self.url) if rev:
--- a/hgext/inotify/__init__.py Sun Apr 26 16:50:44 2009 -0500 +++ b/hgext/inotify/__init__.py Sun Apr 26 16:50:44 2009 -0500 @@ -105,7 +105,7 @@ else: ui.warn(_('failed to contact inotify server: %s\n') % err[-1]) - ui.print_exc() + ui.traceback() # replace by old status function self.status = super(inotifydirstate, self).status
--- a/mercurial/dispatch.py Sun Apr 26 16:50:44 2009 -0500 +++ b/mercurial/dispatch.py Sun Apr 26 16:50:44 2009 -0500 @@ -47,7 +47,7 @@ # enter the debugger when we hit an exception if '--debugger' in args: pdb.post_mortem(sys.exc_info()[2]) - ui.print_exc() + ui.traceback() raise # Global exception handling, alphabetically
--- a/mercurial/extensions.py Sun Apr 26 16:50:44 2009 -0500 +++ b/mercurial/extensions.py Sun Apr 26 16:50:44 2009 -0500 @@ -87,7 +87,7 @@ else: ui.warn(_("*** failed to import extension %s: %s\n") % (name, inst)) - if ui.print_exc(): + if ui.traceback(): return 1 def wrapcommand(table, command, wrapper):
--- a/mercurial/hook.py Sun Apr 26 16:50:44 2009 -0500 +++ b/mercurial/hook.py Sun Apr 26 16:50:44 2009 -0500 @@ -61,7 +61,7 @@ '%s\n') % (hname, exc)) if throw: raise - ui.print_exc() + ui.traceback() return True if r: if throw:
--- a/mercurial/httprepo.py Sun Apr 26 16:50:44 2009 -0500 +++ b/mercurial/httprepo.py Sun Apr 26 16:50:44 2009 -0500 @@ -82,7 +82,7 @@ raise except httplib.HTTPException, inst: self.ui.debug(_('http error while sending %s command\n') % cmd) - self.ui.print_exc() + self.ui.traceback() raise IOError(None, inst) except IndexError: # this only happens with Python 2.3, later versions raise URLError
--- a/mercurial/ui.py Sun Apr 26 16:50:44 2009 -0500 +++ b/mercurial/ui.py Sun Apr 26 16:50:44 2009 -0500 @@ -334,7 +334,7 @@ return t - def print_exc(self): + def traceback(self): '''print exception traceback if traceback printing enabled. only to call in exception handler. returns true if traceback printed.'''