summary: add empty repository and no revision checked out hints
authorMatt Mackall <mpm@selenic.com>
Tue, 20 Oct 2009 11:57:25 -0500
changeset 9618 d75a309a24b1
parent 9617 fafd653134d0
child 9619 c4a6ce16708a
summary: add empty repository and no revision checked out hints
mercurial/commands.py
--- a/mercurial/commands.py	Mon Oct 19 23:53:25 2009 -0500
+++ b/mercurial/commands.py	Tue Oct 20 11:57:25 2009 -0500
@@ -2891,8 +2891,14 @@
 
     for p in parents:
         t = ' '.join([t for t in tags if tags[t] == p.node()])
+        if p.rev() == -1:
+            if not len(repo):
+                t += _(' (empty repository)')
+            else:
+                t += _(' (no revision checked out)')
         ui.write(_('parent: %d:%s %s\n') % (p.rev(), str(p), t))
-        ui.status(' ' + p.description().splitlines()[0].strip() + '\n')
+        if p.description():
+            ui.status(' ' + p.description().splitlines()[0].strip() + '\n')
 
     branch = ctx.branch()
     bheads = repo.branchheads(branch)