# HG changeset patch # User Brendan Cully # Date 1183045363 25200 # Node ID 04b2c1e27c269d1325a8f6f4088e44a38d3d9b8f # Parent 8d4fac0a9df7670726d747f7e327c8f812b0895c mq: require patch argument or revision for qdelete diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -532,6 +532,9 @@ class queue: return (err, n) def delete(self, repo, patches, opts): + if not patches and not opts.get('rev'): + raise util.Abort(_('missing patch name')) + realpatches = [] for patch in patches: patch = self.lookup(patch, strict=True) diff --git a/tests/test-mq-qdelete b/tests/test-mq-qdelete --- a/tests/test-mq-qdelete +++ b/tests/test-mq-qdelete @@ -13,6 +13,8 @@ hg qnew a hg qnew b hg qnew c +hg qdel + hg qdel c hg qpop hg qdel c diff --git a/tests/test-mq-qdelete.out b/tests/test-mq-qdelete.out --- a/tests/test-mq-qdelete.out +++ b/tests/test-mq-qdelete.out @@ -1,4 +1,5 @@ adding base +abort: missing patch name abort: cannot delete applied patch c Now at: b a