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

mq: reload patch queue list, auto-select current. Show patch series

Changeset 1d90d0af8363

Parent 07b0268b5110

by Steve Borho

Changes to one file · Browse files at 1d90d0af8363 Showing diff from parent 07b0268b5110 Diff from another changeset...

 
13
14
15
 
16
17
18
 
205
206
207
 
 
208
209
210
211
212
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
214
215
 
13
14
15
16
17
18
19
 
206
207
208
209
210
211
212
213
214
 
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
@@ -13,6 +13,7 @@
   from mercurial import hg, ui, url, util, error  from mercurial import merge as mergemod +from hgext import mq as mqmod    from tortoisehg.util import hglib, patchctx  from tortoisehg.hgqt.i18n import _ @@ -205,11 +206,33 @@
  self.refreshing = False     def _reload(self): + ui, repo = self.repo.ui, self.repo +   self.queueCombo.clear()   self.msgHistoryCombo.clear()   self.queueListWidget.clear()   self.fileListWidget.clear() - # refresh self.queueCombo + + ui.pushbuffer() + mqmod.qqueue(ui, repo, list=True) + out = ui.popbuffer() + activestr = ' (active)' # TODO: not locale safe + for i, qname in enumerate(out.splitlines()): + if qname.endswith(activestr): + current = i + qname = qname[:-len(activestr)] + self.queueCombo.addItem(hglib.tounicode(qname)) + self.queueCombo.setCurrentIndex(current) + + applied = set([p.name for p in repo.mq.applied]) + for patch in repo.mq.series: + item = QListWidgetItem(hglib.tounicode(patch)) + if patch in applied: + f = item.font() + f.setWeight(QFont.Bold) + item.setFont(f) + self.queueListWidget.addItem(item) +   # refresh self.queueListWidget   # refresh self.msgHistoryCombo   # update enabled states of qtbarhbox buttons