Mercurial > hg
changeset 4662:f9b8ea362b49
identify: show nullid for empty repo
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 21 Jun 2007 11:42:39 -0500 |
parents | a7e9b6b1adeb |
children | 6b2e8cb39583 |
files | mercurial/commands.py tests/test-tags.out |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Jun 21 10:00:59 2007 +0200 +++ b/mercurial/commands.py Thu Jun 21 11:42:39 2007 -0500 @@ -1441,10 +1441,10 @@ 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]