Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

hglib: further cleanups for recent hg-main changes

ui.traceback -> ui._traceback
ui.print_exc() -> ui.traceback()

Because of this, I just remove references to tracebacks.

Changeset c67cf2afb3e5

Parent e13a7bb4d975

by Steve Borho

Changes to one file · Browse files at c67cf2afb3e5 Showing diff from parent e13a7bb4d975 Diff from another changeset...

Change 1 of 4 Show Entire File hggtk/​hglib.py Stacked
 
172
173
174
175
176
177
178
179
180
181
 
265
266
267
268
269
270
271
272
273
274
275
276
277
 
302
303
304
 
305
306
307
 
441
442
443
444
 
 
 
 
 
445
446
447
 
172
173
174
 
 
 
 
175
176
177
 
261
262
263
 
 
264
265
266
267
 
268
269
270
 
295
296
297
298
299
300
301
 
435
436
437
 
438
439
440
441
442
443
444
445
@@ -172,10 +172,6 @@
  raise util.Abort(_('response expected'))   return r   - def print_exc(self): - traceback.print_exc() - return True -  class HgThread(thread2.Thread):   '''   Run an hg command in a background thread, implies output is being @@ -265,13 +261,10 @@
  self.ui.write_err(str(e))   except util.Abort, e:   self.ui.write_err(str(e)) - if self.ui.traceback: - self.ui.print_exc()   except urllib2.HTTPError, e:   self.ui.write_err(str(e) + '\n')   except Exception, e:   self.ui.write_err(str(e)) - self.ui.print_exc()    def _earlygetopt(aliases, args):   """Return list of values for an option (or aliases). @@ -302,6 +295,7 @@
  pos += 1   return values   +# this function is only needed for Mercurial versions < 1.3  _loaded = {}  def thgdispatch(ui, path=None, args=[], nodefaults=True):   ''' @@ -441,7 +435,11 @@
  for a in args:   q.put(str(a))   u = Qui() - return thgdispatch(u, path, list(args)) + if hasattr(ui.ui, 'copy'): + # Mercurial 1.3 + return dispatch._dispatch(u, list(args)) + else: + return thgdispatch(u, path, list(args))    def displaytime(date):   return util.datestr(date, '%Y-%m-%d %H:%M:%S %1%2')