diff mercurial/commands.py @ 4662:f9b8ea362b49

identify: show nullid for empty repo
author Matt Mackall <mpm@selenic.com>
date Thu, 21 Jun 2007 11:42:39 -0500
parents 7a7d4937272b
children dedb8abfd0e1
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1441,10 +1441,10 @@ def identify(ui, repo):
     hash identifiers, followed by a "+" if there are uncommitted changes
     in the working directory, followed by a list of tags for this revision.
     """
+
     parents = [p for p in repo.dirstate.parents() if p != nullid]
     if not parents:
-        ui.write(_("unknown\n"))
-        return
+        parents = [nullid]
 
     hexfunc = ui.debugflag and hex or short
     modified, added, removed, deleted = repo.status()[:4]