Mercurial > hg
changeset 10834:4ab459a6c25c
commands: small refactoring in summary
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Mon, 05 Apr 2010 11:58:54 +0200 |
parents | d7b601f1e02c |
children | 6e876718d0cf |
files | mercurial/commands.py |
diffstat | 1 files changed, 5 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Apr 05 11:52:40 2010 +0200 +++ b/mercurial/commands.py Mon Apr 05 11:58:54 2010 +0200 @@ -3078,19 +3078,16 @@ tags = repo.tags() for p in parents: - message = '' - if p.rev() == -1: - if not len(repo): - message = _(' (empty repository)') - else: - message = _(' (no revision checked out)') # label with log.changeset (instead of log.parent) since this # shows a working directory parent *changeset*: ui.write(_('parent: %d:%s ') % (p.rev(), str(p)), label='log.changeset') ui.write(' '.join(p.tags()), label='log.tag') - if message: - ui.write(message) + if p.rev() == -1: + if not len(repo): + ui.write(_(' (empty repository)')) + else: + ui.write(_(' (no revision checked out)')) ui.write('\n') if p.description(): ui.status(' ' + p.description().splitlines()[0].strip() + '\n',