# HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 2010-10-09 15:36:50 # Node ID 5192b24f309ce6e7a7442103234a41b2779534f4 # Parent 646eb9337c87714d559a98dbb146f871ec7a55a9 mq: handle deleting the same patch twice in one command (issue2427) diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -765,7 +765,8 @@ class queue(object): raise util.Abort(_("cannot delete applied patch %s") % patch) if patch not in self.series: raise util.Abort(_("patch %s not in series file") % patch) - realpatches.append(patch) + if patch not in realpatches: + realpatches.append(patch) numrevs = 0 if opts.get('rev'): diff --git a/tests/test-mq-qdelete.t b/tests/test-mq-qdelete.t --- a/tests/test-mq-qdelete.t +++ b/tests/test-mq-qdelete.t @@ -24,7 +24,9 @@ popping c now at: b - $ hg qdel c +Delete the same patch twice in one command (issue2427) + + $ hg qdel c c $ hg qseries a