Some debugging code. It looks like the main bugs involve files that are deleted and...
authorJohn Arbash Meinel <john@arbash-meinel.com>
Tue, 1 Dec 2009 15:15:19 +0000 (09:15 -0600)
committerJohn Arbash Meinel <john@arbash-meinel.com>
Tue, 1 Dec 2009 15:15:19 +0000 (09:15 -0600)
revision_store.py

index c40ac0faccb57fb42401a8daed10a694ff64f45e..d0ea181af99a0b2802216a67aa687ad11a5f6e04 100644 (file)
@@ -364,13 +364,19 @@ class AbstractRevisionStore(object):
                 self._graph = self.repo.revisions.get_known_graph_ancestry(
                     [(r,) for r in rev.parent_ids])
         if self._graph is not None:
+            orig_heads = builder._heads
             def thunked_heads(file_id, revision_ids):
                 # self._graph thinks in terms of keys, not ids, so translate
                 # them
+                # old_res = orig_heads(file_id, revision_ids)
                 if len(revision_ids) < 2:
-                    return set(revision_ids)
-                return set([h[0] for h in
-                            self._graph.heads([(r,) for r in revision_ids])])
+                    res = set(revision_ids)
+                else:
+                    res = set([h[0] for h in
+                              self._graph.heads([(r,) for r in revision_ids])])
+                # if old_res != res:
+                #     import pdb; pdb.set_trace()
+                return res
             builder._heads = thunked_heads
 
         if rev.parent_ids: