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

stable mq: check for rejection messages after qpush operations

We're going to have to suggest that MQ users stick to English messages if they
use the MQ widget, or somehow force English for these commands.

Changeset f86033a1064b

Parent b669652cc012

by Steve Borho

Changes to one file · Browse files at f86033a1064b Showing diff from parent b669652cc012 Diff from another changeset...

 
229
230
231
232
 
233
234
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
236
237
 
240
241
242
 
243
244
245
 
250
251
252
 
253
254
255
 
282
283
284
 
285
286
287
 
403
404
405
406
 
407
408
409
 
229
230
231
 
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
 
258
259
260
261
262
263
264
 
269
270
271
272
273
274
275
 
302
303
304
305
306
307
308
 
424
425
426
 
427
428
429
430
@@ -229,9 +229,27 @@
  self.qtbar.setEnabled(True)   self.repo.decrementBusyCount()   if self.finishfunc: - self.finishfunc(ret, self.cmd.core.rawoutput()) + self.finishfunc(ret)   self.finishfunc = None   + def checkForRejects(self, ret): + if ret is 0: + self.refreshFileListWidget() + return + rejre = re.compile('saving rejects to file (.*).rej') + for m in rejre.finditer(self.cmd.core.rawoutput()): + wfile = m.groups()[0] + if not os.path.exists(self.repo.wjoin(wfile)): + continue + ufile = hglib.tounicode(wfile) + if qtlib.QuestionMsgBox(_('Manually resolve rejected chunks?'), + _('%s had rejected chunks, edit patched ' + 'file together with rejects?') % ufile, + parent=self): + dlg = rejects.RejectsDialog(self.repo.wjoin(wfile), self) + dlg.exec_() + self.refreshFileListWidget() +   @pyqtSlot()   def onPushAll(self):   if self.cmd.running(): @@ -240,6 +258,7 @@
  cmdline = ['qpush', '-R', self.repo.root, '--all']   cmdline += self.getUserOptions('force', 'exact')   self.qtbar.setEnabled(False) + self.finishfunc = self.checkForRejects   self.cmd.run(cmdline)     @pyqtSlot() @@ -250,6 +269,7 @@
  cmdline = ['qpush', '-R', self.repo.root]   cmdline += self.getUserOptions('force', 'exact')   self.qtbar.setEnabled(False) + self.finishfunc = self.checkForRejects   self.cmd.run(cmdline)     @pyqtSlot() @@ -282,6 +302,7 @@
  cmdline += ['--move', '--', patch]   self.repo.incrementBusyCount()   self.qtbar.setEnabled(False) + self.finishfunc = self.checkForRejects   self.cmd.run(cmdline)     @pyqtSlot() @@ -403,7 +424,7 @@
    @pyqtSlot()   def onQNewOrQRefresh(self): - def finished(ret, output): + def finished(ret):   self.newCheckBox.setChecked(False)   if self.newCheckBox.isChecked():   name = hglib.fromunicode(self.patchNameLE.text())