hgext/mq.py
branchstable
changeset 16063 c36db39b3fee
parent 16048 140b6282ac79
child 16064 7e5a281a082c
--- a/hgext/mq.py	Fri Feb 03 19:23:13 2012 +0100
+++ b/hgext/mq.py	Fri Feb 03 19:38:31 2012 +0100
@@ -1757,9 +1757,9 @@
             for i in xrange(start, len(self.series)):
                 p, reason = self.pushable(i)
                 if p:
-                    break
+                    return i
                 self.explainpushable(i)
-            return i
+            return len(self.series)
         if self.applied:
             p = self.applied[-1].name
             try:
@@ -2205,7 +2205,7 @@
 
 @command("qnext", seriesopts, _('hg qnext [-s]'))
 def next(ui, repo, **opts):
-    """print the name of the next patch
+    """print the name of the next pushable patch
 
     Returns 0 on success."""
     q = repo.mq