Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9.3, 2.0, and 2.0.1

stable qqueue: do not use cmdui.Runner to reload the queue data

Changeset 4f5a6867cc47

Parent 99e0c4546e0c

by Johan Samyn

Changes to one file · Browse files at 4f5a6867cc47 Showing diff from parent 99e0c4546e0c Diff from another changeset...

 
112
113
114
115
116
117
118
119
120
 
134
135
136
137
138
139
140
 
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
 
 
 
 
 
 
 
 
 
 
201
202
203
 
112
113
114
 
 
 
115
116
117
 
131
132
133
 
134
135
136
 
173
174
175
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
177
178
179
180
181
182
183
184
185
186
187
188
@@ -112,9 +112,6 @@
  botsep = qtlib.LabeledSeparator('')   layout.addWidget(botsep)   - cmdlist = cmdui.Runner() - cmdlist.output.connect(self.output) - cmdlist.makeLogVisible.connect(self.makeLogVisible)   cmd = cmdui.Runner()   cmd.output.connect(self.output)   cmd.makeLogVisible.connect(self.makeLogVisible) @@ -134,7 +131,6 @@
  self.btdel = btdel   self.btpur = btpur   self.bb = bb - self.cmdlist = cmdlist   self.cmd = cmd     self.itemfont = None @@ -177,27 +173,16 @@
    @pyqtSlot()   def reload(self): - def reloadFinished(): - output = self.cmdlist.core.rawoutput() - self.showQueues(output) - self.updateUI() - cmdline = ['qqueue', '--repository', self.repo.root, '--list'] - self.cmdlist.commandFinished.connect(reloadFinished) - self.cmdlist.run(cmdline) - - # This seems to return the cached data as it was just before the last - # issued command. So I used the threaded method again. - # def reload(self): - # _ui = uimod.ui() - # _ui.pushbuffer() - # try: - # opts = {'list': True} - # mq.qqueue(_ui, self.repo, None, **opts) - # except (util.Abort, EnvironmentError), e: - # print e - # output = _ui.popbuffer() - # qtlib.InfoMsgBox('test', '<p>reload - output = %s</p>' % output) - # self.showQueues(output) + _ui = uimod.ui() + _ui.pushbuffer() + try: + opts = {'list': True} + mq.qqueue(_ui, self.repo, None, **opts) + except (util.Abort, EnvironmentError), e: + print e + output = _ui.popbuffer() + self.showQueues(output) + self.updateUI()     def showQueues(self, output):   queues = output.rstrip('\n').split('\n')