##// END OF EJS Templates
Replace qdel/qfold -f option with -k/--keep.
Brendan Cully -
r2904:57b88b86 default
parent child Browse files
Show More
@@ -506,14 +506,14 b' class queue:'
506 506 tr.close()
507 507 return (err, n)
508 508
509 def delete(self, repo, patch, force=False):
509 def delete(self, repo, patch, keep=False):
510 510 patch = self.lookup(patch, strict=True)
511 511 info = self.isapplied(patch)
512 512 if info:
513 513 raise util.Abort(_("cannot delete applied patch %s") % patch)
514 514 if patch not in self.series:
515 515 raise util.Abort(_("patch %s not in series file") % patch)
516 if force:
516 if not keep:
517 517 r = self.qrepo()
518 518 if r:
519 519 r.remove([patch], True)
@@ -1304,9 +1304,9 b' def delete(ui, repo, patch, **opts):'
1304 1304 """remove a patch from the series file
1305 1305
1306 1306 The patch must not be applied.
1307 With -f, deletes the patch file as well as the series entry."""
1307 With -k, the patch file is preserved in the patch directory."""
1308 1308 q = repo.mq
1309 q.delete(repo, patch, force=opts.get('force'))
1309 q.delete(repo, patch, keep=opts.get('keep'))
1310 1310 q.save_dirty()
1311 1311 return 0
1312 1312
@@ -1464,7 +1464,7 b' def fold(ui, repo, *files, **opts):'
1464 1464 applied to the current patch in the order given. If all the
1465 1465 patches apply successfully, the current patch will be refreshed
1466 1466 with the new cumulative patch, and the folded patches will
1467 be deleted. With -f/--force, the folded patch files will
1467 be deleted. With -k/--keep, the folded patch files will not
1468 1468 be removed afterwards.
1469 1469
1470 1470 The header for each folded patch will be concatenated with
@@ -1514,7 +1514,7 b' def fold(ui, repo, *files, **opts):'
1514 1514 q.refresh(repo, msg=message)
1515 1515
1516 1516 for patch in patches:
1517 q.delete(repo, patch, force=opts['force'])
1517 q.delete(repo, patch, keep=opts['keep'])
1518 1518
1519 1519 q.save_dirty()
1520 1520
@@ -1903,14 +1903,14 b' cmdtable = {'
1903 1903 commands.table["^commit|ci"][1],
1904 1904 'hg qcommit [OPTION]... [FILE]...'),
1905 1905 "^qdiff": (diff, [], 'hg qdiff [FILE]...'),
1906 "qdelete":
1906 "qdelete|qremove|qrm":
1907 1907 (delete,
1908 [('f', 'force', None, _('delete patch file'))],
1909 'hg qdelete [-f] PATCH'),
1908 [('k', 'keep', None, _('keep patch file'))],
1909 'hg qdelete [-k] PATCH'),
1910 1910 'qfold':
1911 1911 (fold,
1912 1912 [('e', 'edit', None, _('edit patch header')),
1913 ('f', 'force', None, _('delete folded patch files')),
1913 ('k', 'keep', None, _('keep folded patch files')),
1914 1914 ('m', 'message', '', _('set patch header to <text>')),
1915 1915 ('l', 'logfile', '', _('set patch header to contents of <file>'))],
1916 1916 'hg qfold [-e] [-m <text>] [-l <file] PATCH...'),
General Comments 0
You need to be logged in to leave comments. Login now