Rev 136: Some small tweaks, getting ready to add the fast-path. in http://bazaar.launchpad.net/%2Bbranch/bzr-history-db
John Arbash Meinel
john at arbash-meinel.com
Tue May 31 07:47:58 UTC 2011
At http://bazaar.launchpad.net/%2Bbranch/bzr-history-db
------------------------------------------------------------
revno: 136
revision-id: john at arbash-meinel.com-20110531074739-fs80nth547ntoymf
parent: john at arbash-meinel.com-20110527144903-ydfkvxabja32u923
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: bzr-history-db
timestamp: Tue 2011-05-31 09:47:39 +0200
message:
Some small tweaks, getting ready to add the fast-path.
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py 2011-01-28 22:12:47 +0000
+++ b/__init__.py 2011-05-31 07:47:39 +0000
@@ -271,7 +271,7 @@
t1 = time.clock()
if history_db_path is None:
if 'history_db' in debug.debug_flags:
- trace.mutter('Note updating history-db, "history_db_path"'
+ trace.mutter('Not updating history-db, "history_db_path"'
' not configured')
return
importer = _mod_history_db.Importer(history_db_path, params.branch,
=== modified file 'history_db.py'
--- a/history_db.py 2011-01-28 22:08:58 +0000
+++ b/history_db.py 2011-05-31 07:47:39 +0000
@@ -383,7 +383,7 @@
pmap = self._branch.repository.get_parent_map([rev_id])
parent_map.update(pmap)
parent_ids = pmap.get(rev_id, None)
- if parent_ids is None or parent_ids == NULL_PARENTS:
+ if not parent_ids or parent_ids == NULL_PARENTS:
# We can insert this rev directly, because we know its
# gdfo, as it has no parents.
parent_map[rev_id] = ()
=== modified file 'tests/test_importer.py'
--- a/tests/test_importer.py 2011-01-28 19:44:46 +0000
+++ b/tests/test_importer.py 2011-05-31 07:47:39 +0000
@@ -70,6 +70,13 @@
val.sort()
self.assertEqual(expected, actual)
+ def test__is_imported(self):
+ b = self.make_interesting_branch()
+ importer = history_db.Importer(':memory:', b, incremental=True)
+ self.assertFalse(importer._is_imported(b.last_revision()))
+ importer.do_import()
+ self.assertTrue(importer._is_imported(b.last_revision()))
+
def test_import_records_ghosts(self):
b = self.make_branch_with_ghosts()
importer = history_db.Importer(':memory:', b, incremental=False)
More information about the bazaar-commits
mailing list