Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.3, 2.0.4, and 2.0.5

stable backout: Improve the UI when the backout is complete by showing a "Close" button

This also makes the behavior consistent in the case where the parent is
backed out (don't close the dialog when the details are being shown).

Changeset 55a0ebf640ef

Parent 112f20dd76d0

by Daniel Atallah

Changes to one file · Browse files at 55a0ebf640ef Showing diff from parent 112f20dd76d0 Diff from another changeset...

 
25
26
27
28
29
30
31
 
201
202
203
 
 
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
222
223
 
25
26
27
 
28
29
30
 
200
201
202
203
204
205
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
@@ -25,7 +25,6 @@
  self.setWindowFlags(f & ~Qt.WindowContextHelpButtonHint)   self.setWindowIcon(qtlib.geticon('hg-revert'))   self.repo = repo - self.didbackout = False     # main layout box   box = QVBoxLayout() @@ -201,23 +200,32 @@
  def command_finished(self, ret):   self.repo.decrementBusyCount()   self.cancelBtn.setHidden(True) + + # If the action wasn't successful, display the output and we're done   if ret not in (0, 1):   self.detailBtn.setChecked(True)   self.closeBtn.setShown(True)   self.closeBtn.setAutoDefault(True)   self.closeBtn.setFocus() - elif self.backoutParent: - self.accept() - elif self.cmdline[0] == 'backout': - self.didbackout = True - self.msgTextEdit.setEnabled(True) - self.backoutBtn.setEnabled(True) - self.backoutBtn.setText(_('Commit')) - self.backoutBtn.clicked.disconnect(self.backout) - self.backoutBtn.clicked.connect(self.commit) - self.checkResolve() - elif not self.cmd.outputShown(): - self.accept() + else: + finished = True + #If we backed out our parent, there is no second commit step + if self.cmdline[0] == 'backout' and not self.backoutParent: + finished = False + self.msgTextEdit.setEnabled(True) + self.backoutBtn.setEnabled(True) + self.backoutBtn.setText(_('Commit')) + self.backoutBtn.clicked.disconnect(self.backout) + self.backoutBtn.clicked.connect(self.commit) + self.checkResolve() + + if finished: + if not self.cmd.outputShown(): + self.accept() + else: + self.closeBtn.clicked.disconnect(self.reject) + self.closeBtn.clicked.connect(self.accept) + self.closeBtn.setHidden(False)     def checkResolve(self):   for root, path, status in thgrepo.recursiveMergeStatus(self.repo):