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

stable clone: use accept() method to close if clone was successful

This allows the Workbench to open the new repo even if the details pane was
opened.

Changeset 964e21880db6

Parent de6b1d7dda9e

by Steve Borho

Changes to one file · Browse files at 964e21880db6 Showing diff from parent de6b1d7dda9e Diff from another changeset...

 
27
28
29
 
30
31
32
 
137
138
139
140
 
141
142
 
143
144
145
 
306
307
308
309
310
311
312
313
314
315
 
337
338
339
 
340
341
342
 
347
348
349
 
 
 
 
 
 
350
351
352
 
27
28
29
30
31
32
33
 
138
139
140
 
141
142
 
143
144
145
146
 
307
308
309
 
 
 
 
310
311
312
 
334
335
336
337
338
339
340
 
345
346
347
348
349
350
351
352
353
354
355
356
@@ -27,6 +27,7 @@
  f = self.windowFlags()   self.setWindowFlags(f & ~Qt.WindowContextHelpButtonHint)   self.ui = ui.ui() + self.ret = None     dest = src = cwd = hglib.tounicode(os.getcwd())   if len(args) > 1: @@ -137,9 +138,9 @@
  ## bottom buttons   buttons = QDialogButtonBox()   self.cancel_btn = buttons.addButton(QDialogButtonBox.Cancel) - self.cancel_btn.clicked.connect(self.cancel_clicked) + self.cancel_btn.clicked.connect(self.cmd.cancel)   self.close_btn = buttons.addButton(QDialogButtonBox.Close) - self.close_btn.clicked.connect(self.reject) + self.close_btn.clicked.connect(self.onCloseClicked)   self.close_btn.setAutoDefault(False)   self.clone_btn = buttons.addButton(_('&Clone'),   QDialogButtonBox.ActionRole) @@ -306,10 +307,6 @@
  if checked:   target.setFocus()   - def cancel_clicked(self): - self.cmd.cancel() - self.reject() -   def detail_toggled(self, checked):   self.cmd.setShowOutput(checked)   @@ -337,6 +334,7 @@
  self.detail_btn.setShown(True)     def command_finished(self, ret): + self.ret = ret   if ret is not 0 or self.cmd.outputShown():   self.detail_btn.setChecked(True)   self.clone_btn.setShown(True) @@ -347,6 +345,12 @@
  else:   self.accept()   + def onCloseClicked(self): + if self.ret is 0: + self.accept() + else: + self.reject() +   def command_canceling(self):   self.cancel_btn.setDisabled(True)