comparison hgext/mq.py @ 4341:7ae02bce8de2

mq: fix qtop when some patches beneath are guarded
author Brendan Cully <brendan@kublai.com>
date Thu, 12 Apr 2007 14:45:53 -0700
parents 4e5e1638b165
children 077aafddd35f f700ea2b0689
comparison
equal deleted inserted replaced
4340:23068518deca 4341:7ae02bce8de2
1545 return 0 1545 return 0
1546 1546
1547 def top(ui, repo, **opts): 1547 def top(ui, repo, **opts):
1548 """print the name of the current patch""" 1548 """print the name of the current patch"""
1549 q = repo.mq 1549 q = repo.mq
1550 t = len(q.applied) 1550 t = q.series_end()
1551 if t: 1551 if t:
1552 return q.qseries(repo, start=t-1, length=1, status='A', 1552 return q.qseries(repo, start=t-1, length=1, status='A',
1553 summary=opts.get('summary')) 1553 summary=opts.get('summary'))
1554 else: 1554 else:
1555 ui.write("No patches applied\n") 1555 ui.write("No patches applied\n")