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

hglib: try to read ui._buffers or ui.buffers

adapt to changes in mercurial.ui (4746113269c7dbeaeb4c2aeb13e65b046fa8d138)

Changeset 811aa6b2626b

Parent 278134c79beb

by Simon Heimberg

Changes to one file · Browse files at 811aa6b2626b Showing diff from parent 278134c79beb Diff from another changeset...

Change 1 of 3 Show Entire File hggtk/​hglib.py Stacked
 
100
101
102
 
 
 
 
 
 
 
 
 
 
 
 
103
104
105
 
125
126
127
128
129
130
 
131
132
133
 
417
418
419
420
421
422
 
423
424
425
 
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
 
137
138
139
 
 
 
140
141
142
143
 
427
428
429
 
 
 
430
431
432
433
@@ -100,6 +100,18 @@
  return line   return line[0] + line[1:].expandtabs(_tabwidth)   +def uiwrite(u, args): + ''' + write args if there are buffers + returns True if the caller shall handle writing + ''' + buffers = getattr(u, '_buffers', None) + if buffers == None: + buffers = u.buffers + if buffers: + ui.ui.write(u, *args) + return False + return True    def calliffunc(f):   return hasattr(f, '__call__') and f() or f @@ -125,9 +137,7 @@
  self.setconfig('ui', 'interactive', 'on')     def write(self, *args): - if self.buffers: - self.buffers[-1].extend([str(a) for a in args]) - else: + if uiwrite(self, args):   for a in args:   self.outputq.put(str(a))   @@ -417,9 +427,7 @@
  self.setconfig('ui', 'interactive', 'off')     def write(self, *args): - if self.buffers: - self.buffers[-1].extend([str(a) for a in args]) - else: + if uiwrite(self, args):   for a in args:   q.put(str(a))   u = Qui()