mq: handle qpush -a with empty series
authorBrendan Cully <brendan@kublai.com>
Tue, 31 Oct 2006 17:24:42 -0800
changeset 3604 437489d8dfbf
parent 3603 ef9c515836ae
child 3605 9d815b074dcb
mq: handle qpush -a with empty series
hgext/mq.py
--- a/hgext/mq.py	Tue Oct 31 16:35:44 2006 -0800
+++ b/hgext/mq.py	Tue Oct 31 17:24:42 2006 -0800
@@ -1731,6 +1731,8 @@
     mergeq = None
 
     if opts['all']:
+        if not q.series:
+            raise util.Abort(_('no patches in series'))
         patch = q.series[-1]
     if opts['merge']:
         if opts['name']: