comparison mercurial/commands.py @ 9618:d75a309a24b1

summary: add empty repository and no revision checked out hints
author Matt Mackall <mpm@selenic.com>
date Tue, 20 Oct 2009 11:57:25 -0500
parents fafd653134d0
children c4a6ce16708a
comparison
equal deleted inserted replaced
9617:fafd653134d0 9618:d75a309a24b1
2889 pnode = parents[0].node() 2889 pnode = parents[0].node()
2890 tags = repo.tags() 2890 tags = repo.tags()
2891 2891
2892 for p in parents: 2892 for p in parents:
2893 t = ' '.join([t for t in tags if tags[t] == p.node()]) 2893 t = ' '.join([t for t in tags if tags[t] == p.node()])
2894 if p.rev() == -1:
2895 if not len(repo):
2896 t += _(' (empty repository)')
2897 else:
2898 t += _(' (no revision checked out)')
2894 ui.write(_('parent: %d:%s %s\n') % (p.rev(), str(p), t)) 2899 ui.write(_('parent: %d:%s %s\n') % (p.rev(), str(p), t))
2895 ui.status(' ' + p.description().splitlines()[0].strip() + '\n') 2900 if p.description():
2901 ui.status(' ' + p.description().splitlines()[0].strip() + '\n')
2896 2902
2897 branch = ctx.branch() 2903 branch = ctx.branch()
2898 bheads = repo.branchheads(branch) 2904 bheads = repo.branchheads(branch)
2899 ui.status(_('branch: %s\n') % branch) 2905 ui.status(_('branch: %s\n') % branch)
2900 2906