equal
deleted
inserted
replaced
741 continue |
741 continue |
742 return c |
742 return c |
743 |
743 |
744 def lookup(self, id): |
744 def lookup(self, id): |
745 """locate a node based on revision number or subset of hex nodeid""" |
745 """locate a node based on revision number or subset of hex nodeid""" |
|
746 if id in self.nodemap: |
|
747 return id |
746 if type(id) == type(0): |
748 if type(id) == type(0): |
747 rev = id |
749 rev = id |
748 if rev < 0: rev = self.count() + rev |
750 if rev < 0: rev = self.count() + rev |
749 if rev < 0 or rev >= self.count(): return None |
751 if rev < 0 or rev >= self.count(): return None |
750 return self.node(rev) |
752 return self.node(rev) |