Mercurial > hg
changeset 2561:494f7787d8ee
revlog: make lookup handle binary nodes
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 28 Jun 2006 16:52:42 -0500 |
parents | c35694df7b13 |
children | a020024c5870 |
files | mercurial/revlog.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revlog.py Wed Jun 28 15:49:33 2006 -0500 +++ b/mercurial/revlog.py Wed Jun 28 16:52:42 2006 -0500 @@ -743,6 +743,8 @@ def lookup(self, id): """locate a node based on revision number or subset of hex nodeid""" + if id in self.nodemap: + return id if type(id) == type(0): rev = id if rev < 0: rev = self.count() + rev