hgext/mq.py
changeset 4338 7ae02bce8de2
parent 4332 4e5e1638b165
child 4339 077aafddd35f
child 4408 f700ea2b0689
equal deleted inserted replaced
4337:23068518deca 4338: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")