Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

thgmq: support deleting multiple patches

Changeset 5851e8cc51f6

Parent 209794b63588

by Yuki KODAMA

Changes to one file · Browse files at 5851e8cc51f6 Showing diff from parent 209794b63588 Diff from another changeset...

 
328
329
330
331
 
332
333
334
 
 
 
 
 
 
335
336
337
 
344
345
346
347
 
348
349
350
 
328
329
330
 
331
332
333
 
334
335
336
337
338
339
340
341
342
 
349
350
351
 
352
353
354
355
@@ -328,10 +328,15 @@
  """   [MQ] Execute 'qdelete' command.   - patch: the patch name or an index to specify the patch. + patch: a patch name or an index number, or its list.   keep: if True, use '--keep' option. (default: False)   """ - if not self.has_patch(): + if not patch or not self.has_patch(): + return + if isinstance(patch, (basestring, int, long)): + patch = [patch] + unapplied = [p for p in patch if not self.is_applied(p)] + if not unapplied:   return   if not keep:   ret = gdialog.CustomPrompt(_('Confirm Delete'), @@ -344,7 +349,7 @@
  keep = True   else:   return - cmdline = ['hg', 'qdelete', patch] + cmdline = ['hg', 'qdelete'] + unapplied   if keep:   cmdline.append('--keep')   self.cmd.execute(cmdline, self.cmd_done, noemit=True)