# HG changeset patch # User Matt Mackall # Date 1176680558 18000 # Node ID c593e502f7fd9b71843c1e8354064b63a184207e # Parent 8b4d4f84b73972e48d1c6272963c4aa5f236c801# Parent 9bfe93edfbb0e5aef004f0009d35f202340e42b2 Merge with stable diff -r 8b4d4f84b739 -r c593e502f7fd hgext/mq.py --- a/hgext/mq.py Thu Apr 12 12:42:22 2007 -0500 +++ b/hgext/mq.py Sun Apr 15 18:42:38 2007 -0500 @@ -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 8b4d4f84b739 -r c593e502f7fd mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Thu Apr 12 12:42:22 2007 -0500 +++ b/mercurial/hgweb/hgweb_mod.py Sun Apr 15 18:42:38 2007 -0500 @@ -703,7 +703,7 @@ # strip leading / pi = pi[1:] if pi: - root = root[:-len(pi)] + root = root[:root.rfind(root, pi)] if req.env.has_key('REPO_NAME'): rn = req.env['REPO_NAME'] + '/' root += rn diff -r 8b4d4f84b739 -r c593e502f7fd tests/test-mq-guards --- a/tests/test-mq-guards Thu Apr 12 12:42:22 2007 -0500 +++ b/tests/test-mq-guards Sun Apr 15 18:42:38 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 diff -r 8b4d4f84b739 -r c593e502f7fd tests/test-mq-guards.out --- a/tests/test-mq-guards.out Thu Apr 12 12:42:22 2007 -0500 +++ b/tests/test-mq-guards.out Sun Apr 15 18:42:38 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