Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 2789:e3564699409c
Add '.' as a shortcut revision name for the working directory parent.
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Fri, 04 Aug 2006 14:36:03 -0700 |
parents | 386f04d6ecb3 |
children | 2d60c682a081 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sat Aug 05 02:00:09 2006 -0700 +++ b/mercurial/localrepo.py Fri Aug 04 14:36:03 2006 -0700 @@ -292,6 +292,10 @@ try: return self.tags()[key] except KeyError: + if key == '.': + key = self.dirstate.parents()[0] + if key == nullid: + raise repo.RepoError(_("no revision checked out")) try: return self.changelog.lookup(key) except: