changeset 4342:9bfe93edfbb0

Merge with crew
author Matt Mackall <mpm@selenic.com>
date Sun, 15 Apr 2007 18:40:22 -0500
parents 26a2fa9433b8 (current diff) 7ae02bce8de2 (diff)
children c593e502f7fd b633f470944e
files
diffstat 3 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Thu Apr 12 11:00:21 2007 -0500
+++ b/hgext/mq.py	Sun Apr 15 18:40:22 2007 -0500
@@ -1547,7 +1547,7 @@
 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'))
--- a/tests/test-mq-guards	Thu Apr 12 11:00:21 2007 -0500
+++ b/tests/test-mq-guards	Sun Apr 15 18:40:22 2007 -0500
@@ -76,6 +76,10 @@
 hg qselect 2
 echo % should push b.patch
 hg qpush
+hg qpush -a
+# Used to be an issue with holes in the patch sequence
+# So, put one hole on the base and ask for topmost patch.
+hg qtop
 hg qpop -a
 
 hg qselect 1 2
--- a/tests/test-mq-guards.out	Thu Apr 12 11:00:21 2007 -0500
+++ b/tests/test-mq-guards.out	Sun Apr 15 18:40:22 2007 -0500
@@ -46,6 +46,9 @@
 % should push b.patch
 applying b.patch
 Now at: b.patch
+applying c.patch
+Now at: c.patch
+c.patch
 Patch queue now empty
 number of unguarded, unapplied patches has changed from 2 to 3
 % should push a.patch, b.patch