diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -437,9 +437,12 @@ class localrepository(repo.repository): def lookup(self, key): if key == '.': - key = self.dirstate.parents()[0] + key, second = self.dirstate.parents() if key == nullid: raise repo.RepoError(_("no revision checked out")) + if second != nullid: + self.ui.warn(_("warning: working directory has two parents, " + "tag '.' uses the first\n")) elif key == 'null': return nullid n = self.changelog._match(key)