# HG changeset patch # User Siddharth Agarwal # Date 1393316422 28800 # Node ID aa8519daf037d63cb6fb8b9a7387dea4c6f08973 # Parent 1323058cc652fd68514e3a27f31be7301091490a overlayrevlog: handle rev = 0 correctly Previously we'd just test if gitrev was falsy, which it is if the rev returned is 0, even though it shouldn't be. With this patch, test against None explicitly. This unmasks another bug: see next patch for a fix and a test. diff --git a/hggit/overlay.py b/hggit/overlay.py --- a/hggit/overlay.py +++ b/hggit/overlay.py @@ -187,7 +187,7 @@ def parents(self, n): gitrev = self.repo.revmap.get(n) - if not gitrev: + if gitrev is None: # we've reached a revision we have return self.base.parents(n) commit = self.repo.handler.git.get_object(_maybehex(n))