Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 3801:bd7011246fab
Add "null" pseudo-tag pointing to nullid
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Tue, 05 Dec 2006 13:41:42 -0800 |
parents | 8643b9f90b51 |
children | 2aef481ac73c |
comparison
equal
deleted
inserted
replaced
3794:630caaf29815 | 3801:bd7011246fab |
---|---|
374 def lookup(self, key): | 374 def lookup(self, key): |
375 if key == '.': | 375 if key == '.': |
376 key = self.dirstate.parents()[0] | 376 key = self.dirstate.parents()[0] |
377 if key == nullid: | 377 if key == nullid: |
378 raise repo.RepoError(_("no revision checked out")) | 378 raise repo.RepoError(_("no revision checked out")) |
379 elif key == 'null': | |
380 return nullid | |
379 n = self.changelog._match(key) | 381 n = self.changelog._match(key) |
380 if n: | 382 if n: |
381 return n | 383 return n |
382 if key in self.tags(): | 384 if key in self.tags(): |
383 return self.tags()[key] | 385 return self.tags()[key] |