##// END OF EJS Templates
ui: print_exc() -> traceback()
Matt Mackall -
r8206:cce63ef1 default
parent child Browse files
Show More
@@ -33,7 +33,7 b' class mercurial_sink(converter_sink):'
33 if not self.repo.local():
33 if not self.repo.local():
34 raise NoRepo(_('%s is not a local Mercurial repo') % path)
34 raise NoRepo(_('%s is not a local Mercurial repo') % path)
35 except error.RepoError, err:
35 except error.RepoError, err:
36 ui.print_exc()
36 ui.traceback()
37 raise NoRepo(err.args[0])
37 raise NoRepo(err.args[0])
38 else:
38 else:
39 try:
39 try:
@@ -43,7 +43,7 b' class mercurial_sink(converter_sink):'
43 raise NoRepo(_('%s is not a local Mercurial repo') % path)
43 raise NoRepo(_('%s is not a local Mercurial repo') % path)
44 self.created.append(path)
44 self.created.append(path)
45 except error.RepoError:
45 except error.RepoError:
46 ui.print_exc()
46 ui.traceback()
47 raise NoRepo("could not create hg repo %s as sink" % path)
47 raise NoRepo("could not create hg repo %s as sink" % path)
48 self.lock = None
48 self.lock = None
49 self.wlock = None
49 self.wlock = None
@@ -199,7 +199,7 b' class mercurial_source(converter_source)'
199 if not self.repo.local():
199 if not self.repo.local():
200 raise error.RepoError()
200 raise error.RepoError()
201 except error.RepoError:
201 except error.RepoError:
202 ui.print_exc()
202 ui.traceback()
203 raise NoRepo("%s is not a local Mercurial repo" % path)
203 raise NoRepo("%s is not a local Mercurial repo" % path)
204 self.lastrev = None
204 self.lastrev = None
205 self.lastctx = None
205 self.lastctx = None
@@ -233,7 +233,7 b' class svn_source(converter_source):'
233 self.paths = {}
233 self.paths = {}
234 self.uuid = svn.ra.get_uuid(self.ra).decode(self.encoding)
234 self.uuid = svn.ra.get_uuid(self.ra).decode(self.encoding)
235 except SubversionException:
235 except SubversionException:
236 ui.print_exc()
236 ui.traceback()
237 raise NoRepo("%s does not look like a Subversion repo" % self.url)
237 raise NoRepo("%s does not look like a Subversion repo" % self.url)
238
238
239 if rev:
239 if rev:
@@ -105,7 +105,7 b' def reposetup(ui, repo):'
105 else:
105 else:
106 ui.warn(_('failed to contact inotify server: %s\n')
106 ui.warn(_('failed to contact inotify server: %s\n')
107 % err[-1])
107 % err[-1])
108 ui.print_exc()
108 ui.traceback()
109 # replace by old status function
109 # replace by old status function
110 self.status = super(inotifydirstate, self).status
110 self.status = super(inotifydirstate, self).status
111
111
@@ -47,7 +47,7 b' def _runcatch(ui, args):'
47 # enter the debugger when we hit an exception
47 # enter the debugger when we hit an exception
48 if '--debugger' in args:
48 if '--debugger' in args:
49 pdb.post_mortem(sys.exc_info()[2])
49 pdb.post_mortem(sys.exc_info()[2])
50 ui.print_exc()
50 ui.traceback()
51 raise
51 raise
52
52
53 # Global exception handling, alphabetically
53 # Global exception handling, alphabetically
@@ -87,7 +87,7 b' def loadall(ui):'
87 else:
87 else:
88 ui.warn(_("*** failed to import extension %s: %s\n")
88 ui.warn(_("*** failed to import extension %s: %s\n")
89 % (name, inst))
89 % (name, inst))
90 if ui.print_exc():
90 if ui.traceback():
91 return 1
91 return 1
92
92
93 def wrapcommand(table, command, wrapper):
93 def wrapcommand(table, command, wrapper):
@@ -61,7 +61,7 b' def _pythonhook(ui, repo, name, hname, f'
61 '%s\n') % (hname, exc))
61 '%s\n') % (hname, exc))
62 if throw:
62 if throw:
63 raise
63 raise
64 ui.print_exc()
64 ui.traceback()
65 return True
65 return True
66 if r:
66 if r:
67 if throw:
67 if throw:
@@ -82,7 +82,7 b' class httprepository(repo.repository):'
82 raise
82 raise
83 except httplib.HTTPException, inst:
83 except httplib.HTTPException, inst:
84 self.ui.debug(_('http error while sending %s command\n') % cmd)
84 self.ui.debug(_('http error while sending %s command\n') % cmd)
85 self.ui.print_exc()
85 self.ui.traceback()
86 raise IOError(None, inst)
86 raise IOError(None, inst)
87 except IndexError:
87 except IndexError:
88 # this only happens with Python 2.3, later versions raise URLError
88 # this only happens with Python 2.3, later versions raise URLError
@@ -334,7 +334,7 b' class ui(object):'
334
334
335 return t
335 return t
336
336
337 def print_exc(self):
337 def traceback(self):
338 '''print exception traceback if traceback printing enabled.
338 '''print exception traceback if traceback printing enabled.
339 only to call in exception handler. returns true if traceback
339 only to call in exception handler. returns true if traceback
340 printed.'''
340 printed.'''
General Comments 0
You need to be logged in to leave comments. Login now