Rev 113: We don't need to do anything when the nodes are already present. in http://bazaar.launchpad.net/~bzr/bzr-history-db/trunk

John Arbash Meinel john at arbash-meinel.com
Tue Apr 27 22:58:24 BST 2010


At http://bazaar.launchpad.net/~bzr/bzr-history-db/trunk

------------------------------------------------------------
revno: 113
revision-id: john at arbash-meinel.com-20100427215740-lnni490w2m4d2uxp
parent: john at arbash-meinel.com-20100427215258-gna8751he7m9vc2h
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: trunk
timestamp: Tue 2010-04-27 16:57:40 -0500
message:
  We don't need to do anything when the nodes are already present.
-------------- next part --------------
=== modified file 'history_db.py'
--- a/history_db.py	2010-04-22 21:27:21 +0000
+++ b/history_db.py	2010-04-27 21:57:40 +0000
@@ -157,7 +157,6 @@
     def _insert_nodes(self, tip_rev_id, nodes):
         """Insert all of the nodes mentioned into the database."""
         self._stats['_insert_node_calls'] += 1
-        self._ensure_revisions([n.key[0] for n in nodes])
         if self._is_imported(tip_rev_id):
             # Not importing anything because the data is already present
             return False

=== modified file 'schema.py'
--- a/schema.py	2010-04-27 21:52:58 +0000
+++ b/schema.py	2010-04-27 21:57:40 +0000
@@ -189,6 +189,8 @@
     #     if rev_id in missing:
     #         result[rev_id] = db_id
     #         missing.discard(rev_id)
+    if not remaining:
+        return
     def find_existing():
         cur = 0
         missing = set()



More information about the bazaar-commits mailing list