commands: small refactoring in summary
authorMartin Geisler <mg@lazybytes.net>
Mon, 05 Apr 2010 11:58:54 +0200
changeset 10834 4ab459a6c25c
parent 10833 d7b601f1e02c
child 10835 6e876718d0cf
commands: small refactoring in summary
mercurial/commands.py
--- 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',