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

mq: fix guard behavior, implement refreshSelectedGuards()

Changeset a0ef567e8159

Parent 46069c8c2497

by Steve Borho

Changes to one file · Browse files at a0ef567e8159 Showing diff from parent 46069c8c2497 Diff from another changeset...

 
309
310
311
312
 
313
314
315
316
 
317
318
319
 
332
333
334
 
 
 
 
335
336
337
 
344
345
346
347
348
349
350
 
361
362
363
364
 
 
365
366
367
 
309
310
311
 
312
313
314
315
 
316
317
318
319
 
332
333
334
335
336
337
338
339
340
341
 
348
349
350
 
351
352
353
 
364
365
366
 
367
368
369
370
371
@@ -309,11 +309,11 @@
  item = QListWidgetItem(hglib.tounicode(patch))   if patch in applied: # applied   f = item.font() - f.setWeight(QFont.Bold) + f.setBold(True)   item.setFont(f)   elif not repo.mq.pushable(idx)[0]: # guarded   f = item.font() - f.setWeight(QFont.Italics) + f.setItalic(True)   item.setFont(f)   patchguards = repo.mq.series_guards[idx]   if patchguards: @@ -332,6 +332,10 @@
  for item in reversed(items):   self.queueListWidget.addItem(item)   + for guard in repo.mq.active_guards: + self.allguards.add(guard) + self.refreshSelectedGuards() +   self.messages = []   for patch in repo.mq.series:   ctx = repo.changectx(patch) @@ -344,7 +348,6 @@
  self.revisionOrCommitBtn.setText(_('Commit Queue'))   else:   self.revisionOrCommitBtn.setText(_('Revision Queue')) - self.refreshSelectedGuards()     self.qpushAllBtn.setEnabled(bool(repo.thgmqunappliedpatches))   self.qpushBtn.setEnabled(bool(repo.thgmqunappliedpatches)) @@ -361,7 +364,8 @@
      def refreshSelectedGuards(self): - count, total = 0, 0 + total = len(self.allguards) + count = len(self.repo.mq.active_guards)   self.guardSelBtn.setText(_('Guards: %d/%d') % (count, total))     # Capture drop events, try to import into current patch queue