Rev 273: Some debugging code. It looks like the main bugs involve files that are deleted and restored. in lp:~jameinel/bzr-fastimport/fastimport-kg

John Arbash Meinel john at arbash-meinel.com
Tue Dec 1 15:15:21 GMT 2009


At lp:~jameinel/bzr-fastimport/fastimport-kg

------------------------------------------------------------
revno: 273
revision-id: john at arbash-meinel.com-20091201151519-key0pustue6p1q1c
parent: john at arbash-meinel.com-20091130190044-iz0uy1wbt45n320x
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: fastimport-kg
timestamp: Tue 2009-12-01 09:15:19 -0600
message:
  Some debugging code. It looks like the main bugs involve files that are deleted and restored.
-------------- next part --------------
=== modified file 'revision_store.py'
--- a/revision_store.py	2009-11-30 19:00:44 +0000
+++ b/revision_store.py	2009-12-01 15:15:19 +0000
@@ -364,13 +364,19 @@
                 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:



More information about the bazaar-commits mailing list