mercurial/localrepo.py
changeset 4510 e0bc2c575044
parent 4497 22ebd6ee5672
child 4516 96d8a56d4ef9
equal deleted inserted replaced
4509:9d1380e5c8c5 4510:e0bc2c575044
   435             b = c.branch()
   435             b = c.branch()
   436             partial[b] = c.node()
   436             partial[b] = c.node()
   437 
   437 
   438     def lookup(self, key):
   438     def lookup(self, key):
   439         if key == '.':
   439         if key == '.':
   440             key = self.dirstate.parents()[0]
   440             key, second = self.dirstate.parents()
   441             if key == nullid:
   441             if key == nullid:
   442                 raise repo.RepoError(_("no revision checked out"))
   442                 raise repo.RepoError(_("no revision checked out"))
       
   443             if second != nullid:
       
   444                 self.ui.warn(_("warning: working directory has two parents, "
       
   445                                "tag '.' uses the first\n"))
   443         elif key == 'null':
   446         elif key == 'null':
   444             return nullid
   447             return nullid
   445         n = self.changelog._match(key)
   448         n = self.changelog._match(key)
   446         if n:
   449         if n:
   447             return n
   450             return n