# HG changeset patch # User Matt Mackall # Date 1240782644 18000 # Node ID cce63ef1045b31ea292cb9005677f1deffc5e0e0 # Parent 00736cd2702a2d035ca3d3ec5be15c7848b24cbf ui: print_exc() -> traceback() diff -r 00736cd2702a -r cce63ef1045b hgext/convert/hg.py --- 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 diff -r 00736cd2702a -r cce63ef1045b hgext/convert/subversion.py --- 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: diff -r 00736cd2702a -r cce63ef1045b hgext/inotify/__init__.py --- 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 diff -r 00736cd2702a -r cce63ef1045b mercurial/dispatch.py --- 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 diff -r 00736cd2702a -r cce63ef1045b mercurial/extensions.py --- 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): diff -r 00736cd2702a -r cce63ef1045b mercurial/hook.py --- 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: diff -r 00736cd2702a -r cce63ef1045b mercurial/httprepo.py --- 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 diff -r 00736cd2702a -r cce63ef1045b mercurial/ui.py --- 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.'''