mercurial/localrepo.py
changeset 4510 e0bc2c575044
parent 4497 22ebd6ee5672
child 4516 96d8a56d4ef9
--- a/mercurial/localrepo.py	Wed Jun 06 18:28:48 2007 +0200
+++ b/mercurial/localrepo.py	Wed Jun 06 19:05:18 2007 +0200
@@ -437,9 +437,12 @@
 
     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)