mq: fix qtop when some patches beneath are guarded
authorBrendan Cully <brendan@kublai.com>
Thu, 12 Apr 2007 14:45:53 -0700
changeset 4338 7ae02bce8de2
parent 4337 23068518deca
child 4339 077aafddd35f
child 4345 9bfe93edfbb0
mq: fix qtop when some patches beneath are guarded
hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -1547,7 +1547,7 @@ def series(ui, repo, **opts):
 def top(ui, repo, **opts):
     """print the name of the current patch"""
     q = repo.mq
-    t = len(q.applied)
+    t = q.series_end()
     if t:
         return q.qseries(repo, start=t-1, length=1, status='A',
                          summary=opts.get('summary'))