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

mq: use options set in the options dialog

Changeset 4504595b0ca0

Parent 3f76dd0b11c0

by Steve Borho

Changes to one file · Browse files at 4504595b0ca0 Showing diff from parent 3f76dd0b11c0 Diff from another changeset...

 
188
189
190
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
192
193
 
208
209
210
211
 
 
 
212
213
214
215
216
 
 
 
217
218
219
220
221
 
 
 
222
223
224
225
226
 
 
 
227
228
229
230
 
 
 
231
232
 
233
234
235
 
243
244
245
 
 
 
246
247
 
248
249
250
251
252
253
254
 
 
255
256
257
 
307
308
309
 
 
310
311
312
 
630
631
632
633
 
634
635
636
 
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
 
223
224
225
 
226
227
228
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
256
257
 
258
259
260
261
 
269
270
271
272
273
274
275
 
276
277
278
279
280
281
 
 
282
283
284
285
286
 
336
337
338
339
340
341
342
343
 
661
662
663
 
664
665
666
667
@@ -188,6 +188,21 @@
  self.loadConfigs()   QTimer.singleShot(0, self.reload)   + def getUserOptions(self, *optionlist): + out = [] + for opt in optionlist: + if opt not in self.opts: + continue + val = self['opts'] + if val is False: + continue + elif val is True: + out.append('--' + opt) + else: + out.append('--' + opt) + out.append(val) + return out +   @pyqtSlot()   def onConfigChanged(self):   'Repository is reporting its config files have changed' @@ -208,28 +223,39 @@
  @pyqtSlot()   def onPushAll(self):   self.repo.incrementBusyCount() - self.cmd.run(['qpush', '-R', self.repo.root, '--all']) + cmdline = ['qpush', '-R', self.repo.root, '--all'] + cmdline += self.getUserOptions('force', 'exact') + self.cmd.run(cmdline)     @pyqtSlot()   def onPush(self):   self.repo.incrementBusyCount() - self.cmd.run(['qpush', '-R', self.repo.root]) + cmdline = ['qpush', '-R', self.repo.root] + cmdline += self.getUserOptions('force', 'exact') + self.cmd.run(cmdline)     @pyqtSlot()   def onPopAll(self):   self.repo.incrementBusyCount() - self.cmd.run(['qpop', '-R', self.repo.root, '--all']) + cmdline = ['qpop', '-R', self.repo.root, '--all'] + cmdline += self.getUserOptions('force') + self.cmd.run(cmdline)     @pyqtSlot()   def onPop(self):   self.repo.incrementBusyCount() - self.cmd.run(['qpop', '-R', self.repo.root]) + cmdline = ['qpop', '-R', self.repo.root] + cmdline += self.getUserOptions('force') + self.cmd.run(cmdline)     @pyqtSlot()   def onPushMove(self):   patch = self.queueListWidget.currentItem()._thgpatch + cmdline = ['qpop', '-R', self.repo.root] + cmdline += self.getUserOptions('force') + cmdline += ['--move', '--', patch]   self.repo.incrementBusyCount() - self.cmd.run(['qpush', '-R', self.repo.root, '--move', patch]) + self.cmd.run(cmdline)     @pyqtSlot()   def onDelete(self): @@ -243,15 +269,18 @@
  @pyqtSlot(QListWidgetItem)   def onGotoPatch(self, item):   'Patch has been activated (return), issue qgoto' + cmdline = ['qgoto', '-R', self.repo.root] + cmdline += self.getUserOptions('force') + cmdline += ['--', item._thgpatch]   self.repo.incrementBusyCount() - self.cmd.run(['qgoto', '-R', self.repo.root, item._thgpatch]) + self.cmd.run(cmdline)     @pyqtSlot(QListWidgetItem)   def onRenamePatch(self, item):   'Patch has been renamed, issue qrename'   self.repo.incrementBusyCount() - self.cmd.run(['qrename', '-R', self.repo.root, item._thgpatch, - hglib.fromunicode(item.text())]) + self.cmd.run(['qrename', '-R', self.repo.root, '--', + item._thgpatch, hglib.fromunicode(item.text())])     @pyqtSlot(int)   def onPatchSelected(self, row): @@ -307,6 +336,8 @@
  message = self.messageEditor.text()   if message:   cmdline += ['--message', hglib.fromunicode(message)] + cmdline += self.getUserOptions('user', 'currentuser', 'git', + 'date', 'currentdate')   files = ['--']   for row in xrange(self.fileListWidget.count()):   item = self.fileListWidget.item(row) @@ -630,7 +661,7 @@
  layout = QFormLayout()   self.setLayout(layout)   - self.gitcb = QCheckBox(_('Use git extended diff format')) + self.gitcb = QCheckBox(_('Force use of git extended diff format'))   layout.addRow(self.gitcb, None)     self.forcecb = QCheckBox(_('Force push or pop'))