##// END OF EJS Templates
mq: make 'qdelete <patchidx>' work again....
Greg Ward -
r11365:c3d7daa0 default
parent child Browse files
Show More
@@ -752,6 +752,7 b' class queue(object):'
752 raise util.Abort(_('qdelete requires at least one revision or '
752 raise util.Abort(_('qdelete requires at least one revision or '
753 'patch name'))
753 'patch name'))
754
754
755 realpatches = []
755 for patch in patches:
756 for patch in patches:
756 patch = self.lookup(patch, strict=True)
757 patch = self.lookup(patch, strict=True)
757 info = self.isapplied(patch)
758 info = self.isapplied(patch)
@@ -759,8 +760,8 b' class queue(object):'
759 raise util.Abort(_("cannot delete applied patch %s") % patch)
760 raise util.Abort(_("cannot delete applied patch %s") % patch)
760 if patch not in self.series:
761 if patch not in self.series:
761 raise util.Abort(_("patch %s not in series file") % patch)
762 raise util.Abort(_("patch %s not in series file") % patch)
763 realpatches.append(patch)
762
764
763 patches = list(patches)
764 numrevs = 0
765 numrevs = 0
765 if opts.get('rev'):
766 if opts.get('rev'):
766 if not self.applied:
767 if not self.applied:
@@ -769,10 +770,10 b' class queue(object):'
769 if len(revs) > 1 and revs[0] > revs[1]:
770 if len(revs) > 1 and revs[0] > revs[1]:
770 revs.reverse()
771 revs.reverse()
771 revpatches = self._revpatches(repo, revs)
772 revpatches = self._revpatches(repo, revs)
772 patches += revpatches
773 realpatches += revpatches
773 numrevs = len(revpatches)
774 numrevs = len(revpatches)
774
775
775 self._cleanup(patches, numrevs, opts.get('keep'))
776 self._cleanup(realpatches, numrevs, opts.get('keep'))
776
777
777 def check_toppatch(self, repo):
778 def check_toppatch(self, repo):
778 if self.applied:
779 if self.applied:
@@ -21,7 +21,7 b' hg qdel c'
21 hg qseries
21 hg qseries
22 ls .hg/patches
22 ls .hg/patches
23 hg qpop
23 hg qpop
24 hg qdel -k b
24 hg qdel -k 1
25 ls .hg/patches
25 ls .hg/patches
26 hg qdel -r a
26 hg qdel -r a
27 hg qapplied
27 hg qapplied
General Comments 0
You need to be logged in to leave comments. Login now