# HG changeset patch # User Brendan Cully # Date 1176415625 25200 # Node ID 077aafddd35f3f207f18e7edec2c3da4ef81b47e # Parent 35ad84669ca57b75ce3c567cffe0bd8fd702dfa1# Parent 7ae02bce8de27d0b3f8c3148bf443fa81426467d Merge with crew-stable diff -r 35ad84669ca5 -r 077aafddd35f hgext/mq.py --- a/hgext/mq.py Tue Apr 10 10:34:43 2007 -0700 +++ b/hgext/mq.py Thu Apr 12 15:07:05 2007 -0700 @@ -1586,7 +1586,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')) diff -r 35ad84669ca5 -r 077aafddd35f tests/test-mq-guards --- a/tests/test-mq-guards Tue Apr 10 10:34:43 2007 -0700 +++ b/tests/test-mq-guards Thu Apr 12 15:07:05 2007 -0700 @@ -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 diff -r 35ad84669ca5 -r 077aafddd35f tests/test-mq-guards.out --- a/tests/test-mq-guards.out Tue Apr 10 10:34:43 2007 -0700 +++ b/tests/test-mq-guards.out Thu Apr 12 15:07:05 2007 -0700 @@ -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