Rev 44: Fixed it. I was always stepping mainline even when there were in http://bzr.arbash-meinel.com/plugins/history_db

John Arbash Meinel john at arbash-meinel.com
Mon Apr 5 22:31:21 BST 2010


At http://bzr.arbash-meinel.com/plugins/history_db

------------------------------------------------------------
revno: 44
revision-id: john at arbash-meinel.com-20100405213117-gwgw91apsbn366z9
parent: john at arbash-meinel.com-20100405212724-304upvvqa59uqa9z
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: history_db
timestamp: Mon 2010-04-05 16:31:17 -0500
message:
  Fixed it. I was always stepping mainline even when there were
  no unknowns left. No need to do so.
-------------- next part --------------
=== modified file 'history_db.py'
--- a/history_db.py	2010-04-05 21:27:24 +0000
+++ b/history_db.py	2010-04-05 21:31:17 +0000
@@ -648,8 +648,11 @@
             unknown = list(self._search_tips)
             while unknown:
                 unknown = self._split_search_tips_by_gdfo(unknown)
-                if unknown:
-                    unknown = self._split_interesting_using_children(unknown)
+                if not unknown:
+                    break
+                unknown = self._split_interesting_using_children(unknown)
+                if not unknown:
+                    break
                 # The current search tips are the 'newest' possible tips right
                 # now. If we can't classify them as definitely being
                 # interesting, then we need to step the mainline until we can.

=== modified file 'test_importer.py'
--- a/test_importer.py	2010-04-05 21:27:24 +0000
+++ b/test_importer.py	2010-04-05 21:31:17 +0000
@@ -315,8 +315,9 @@
         inc_importer._find_interesting_ancestry()
         self.assertEqual([self.N_id, self.I_id, self.G_id],
                          inc_importer._mainline_db_ids)
-        # self.assertEqual(self.A_id, inc_importer._imported_mainline_id)
-        # self.assertEqual(1, inc_importer._imported_gdfo)
+        # We should stop loading A, I need to figure out why it gets loaded
+        self.assertEqual(self.A_id, inc_importer._imported_mainline_id)
+        self.assertEqual(1, inc_importer._imported_gdfo)
         self.assertEqual(set([self.E_id, self.F_id, self.G_id, self.H_id,
                               self.I_id, self.J_id, self.K_id, self.L_id,
                               self.M_id, self.N_id]),
@@ -324,5 +325,4 @@
         self.assertEqual(set([]), inc_importer._search_tips)
         self.assertEqual({self.D_id: ('2', 0, 0), self.C_id: ('1.1.2', 0, 1),
                           self.B_id: ('1.1.1', 1, 1),
-                          self.A_id: ('1', 1, 0),
                          }, inc_importer._imported_dotted_revno)



More information about the bazaar-commits mailing list