changeset 690:aa8519daf037

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.
author Siddharth Agarwal <sid0@fb.com>
date Tue, 25 Feb 2014 00:20:22 -0800
parents 1323058cc652
children c99941ff2d28
files hggit/overlay.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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))