diff --git a/hgext/mq.py b/hgext/mq.py index 3b9c18ed998553ab19321e1c8b852fa6b76eac13_aGdleHQvbXEucHk=..c36db39b3fee5dbdea15d92ad5d62657524ea447_aGdleHQvbXEucHk= 100644 --- a/hgext/mq.py +++ b/hgext/mq.py @@ -1757,5 +1757,5 @@ for i in xrange(start, len(self.series)): p, reason = self.pushable(i) if p: - break + return i self.explainpushable(i) @@ -1761,5 +1761,5 @@ 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 diff --git a/tests/test-mq-guards.t b/tests/test-mq-guards.t index 3b9c18ed998553ab19321e1c8b852fa6b76eac13_dGVzdHMvdGVzdC1tcS1ndWFyZHMudA==..c36db39b3fee5dbdea15d92ad5d62657524ea447_dGVzdHMvdGVzdC1tcS1ndWFyZHMudA== 100644 --- a/tests/test-mq-guards.t +++ b/tests/test-mq-guards.t @@ -107,6 +107,9 @@ applying b.patch skipping c.patch - guarded by '-a' now at: b.patch + $ hg qnext + all patches applied + [1] should display b.patch diff --git a/tests/test-mq.t b/tests/test-mq.t index 3b9c18ed998553ab19321e1c8b852fa6b76eac13_dGVzdHMvdGVzdC1tcS50..c36db39b3fee5dbdea15d92ad5d62657524ea447_dGVzdHMvdGVzdC1tcS50 100644 --- a/tests/test-mq.t +++ b/tests/test-mq.t @@ -72,7 +72,7 @@ qheader print the header of the topmost or specified patch qimport import a patch qnew create a new patch - qnext print the name of the next patch + qnext print the name of the next pushable patch qpop pop the current patch off the stack qprev print the name of the previous patch qpush push the next patch onto the stack