Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1, 2.1.1, and 2.1.2

merge: add a checkbox for auto-advancing to the commit page

Changeset a51b7122e2ce

Parent 9b8daa20b2d6

by Steve Borho

Changes to one file · Browse files at a51b7122e2ce Showing diff from parent 9b8daa20b2d6 Diff from another changeset...

 
328
329
330
331
332
333
334
335
 
348
349
350
 
 
 
 
 
 
 
351
352
353
 
394
395
396
 
 
 
 
 
 
 
397
398
399
400
401
 
 
 
402
403
404
 
406
407
408
 
 
409
410
411
 
328
329
330
 
 
331
332
333
 
346
347
348
349
350
351
352
353
354
355
356
357
358
 
399
400
401
402
403
404
405
406
407
408
409
410
411
412
 
413
414
415
416
417
418
 
420
421
422
423
424
425
426
427
@@ -328,8 +328,6 @@
     class MergePage(BasePage): - # TODO: add a checkbox on this page to automatically continue -   def __init__(self, repo, parent):   super(MergePage, self).__init__(repo, parent)   self.mergecomplete = False @@ -348,6 +346,13 @@
  self.reslabel.setWordWrap(True)   self.layout().addWidget(self.reslabel)   + self.autonext = QCheckBox(_('Automatically advance to next page ' + 'when merge is complete.')) + checked = QSettings().value('merge/autoadvance', False).toBool() + self.autonext.setChecked(checked) + self.autonext.toggled.connect(self.tryAutoAdvance) + self.layout().addWidget(self.autonext) +   def currentPage(self):   if self.field('discard').toBool():   # '.' is safer than self.localrev, in case the user has @@ -394,11 +399,20 @@
  self.reslabel.setText(_('No merge conflicts, ready to commit'))   return True   + def tryAutoAdvance(self, checked): + if checked and self.isComplete(): + self.wizard().next() + + def cleanupPage(self): + QSettings().setValue('merge/autoadvance', self.autonext.isChecked()) +   def onCommandFinished(self, ret):   self.repo.decrementBusyCount()   if ret in (0, 1):   self.mergecomplete = True - self.completeChanged.emit() + if self.autonext.isChecked(): + self.tryAutoAdvance(True) + self.completeChanged.emit()     @pyqtSlot(QString)   def onLinkActivated(self, cmd): @@ -406,6 +420,8 @@
  dlg = resolve.ResolveDialog(self.repo, self)   dlg.finished.connect(dlg.deleteLater)   dlg.exec_() + if self.autonext.isChecked(): + self.tryAutoAdvance(True)   self.completeChanged.emit()