Rev 137: It seems we refactored out skipping a tip that has already been imported. in http://bazaar.launchpad.net/%2Bbranch/bzr-history-db

John Arbash Meinel john at arbash-meinel.com
Tue May 31 07:51:46 UTC 2011


At http://bazaar.launchpad.net/%2Bbranch/bzr-history-db

------------------------------------------------------------
revno: 137
revision-id: john at arbash-meinel.com-20110531075129-puu54613p5gm3q27
parent: john at arbash-meinel.com-20110531074739-fs80nth547ntoymf
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: bzr-history-db
timestamp: Tue 2011-05-31 09:51:29 +0200
message:
  It seems we refactored out skipping a tip that has already been imported.
  This at least will un-clutter the logs.
-------------- next part --------------
=== modified file 'history_db.py'
--- a/history_db.py	2011-05-31 07:47:39 +0000
+++ b/history_db.py	2011-05-31 07:51:29 +0000
@@ -291,6 +291,9 @@
             pb = None
         else:
             pb = ui.ui_factory.nested_progress_bar()
+        if self._is_imported(tip_revision_id):
+            # Already imported
+            return []
         if pb is not None:
             pb.update('getting merge_sorted')
         merge_sorted = self._get_merge_sorted_tip(tip_revision_id)

=== modified file 'tests/test_importer.py'
--- a/tests/test_importer.py	2011-05-31 07:47:39 +0000
+++ b/tests/test_importer.py	2011-05-31 07:51:29 +0000
@@ -76,6 +76,7 @@
         self.assertFalse(importer._is_imported(b.last_revision()))
         importer.do_import()
         self.assertTrue(importer._is_imported(b.last_revision()))
+        self.assertEqual([], importer._import_tip(b.last_revision()))
 
     def test_import_records_ghosts(self):
         b = self.make_branch_with_ghosts()



More information about the bazaar-commits mailing list