revlog: fix a regression with null revision
authorAlexander Plavin <me@aplavin.ru>
Thu, 18 Apr 2013 16:46:09 +0400
changeset 19060 c010cb6fdef7
parent 19059 53eadcb814fd
child 19061 36067f5baf24
revlog: fix a regression with null revision Introduced in the patch which fixes issue3497 Part of that patch was erroneously submitted and it shouldn't be in the code
mercurial/revlog.py
tests/test-glog.t
--- a/mercurial/revlog.py	Thu Apr 18 14:28:06 2013 -0700
+++ b/mercurial/revlog.py	Thu Apr 18 16:46:09 2013 +0400
@@ -771,10 +771,6 @@
                 nl = [n for n in nl if hex(n).startswith(id)]
                 if len(nl) > 0:
                     if len(nl) == 1:
-                        if nl[0] == nullid:
-                            # dummy null revision always exists,
-                            # it shouldn't be returned here
-                            return None
                         self._pcache[id] = nl[0]
                         return nl[0]
                     raise LookupError(id, self.indexfile,
--- a/tests/test-glog.t	Thu Apr 18 14:28:06 2013 -0700
+++ b/tests/test-glog.t	Thu Apr 18 16:46:09 2013 +0400
@@ -1542,7 +1542,6 @@
   $ testlog --follow
   []
   []
-  abort: unknown revision '0'!
   $ echo a > a
   $ echo aa > aa
   $ echo f > f