Rev 77: With that bug fix, we have a few large mainline grabs, but most are in http://bzr.arbash-meinel.com/plugins/history_db
John Arbash Meinel
john at arbash-meinel.com
Fri Apr 9 21:57:11 BST 2010
At http://bzr.arbash-meinel.com/plugins/history_db
------------------------------------------------------------
revno: 77
revision-id: john at arbash-meinel.com-20100409205654-0crla2ssb43k29xo
parent: john at arbash-meinel.com-20100409201700-zbzif7j6gaqsn9b4
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: history_db
timestamp: Fri 2010-04-09 15:56:54 -0500
message:
With that bug fix, we have a few large mainline grabs, but most are
shorter than 10 long. The ones I checked seemed inevitable. Long lived
integration branches that get merged infrequently. An FTP fix that was based on
a very old revision and merged multiple times, etc.
For bzr, we are now down to 2m16s.
-------------- next part --------------
=== modified file 'history_db.py'
--- a/history_db.py 2010-04-09 20:17:00 +0000
+++ b/history_db.py 2010-04-09 20:56:54 +0000
@@ -229,6 +229,7 @@
# Map db_ids back to the keys that self._graph would generate
# Assert that the result is valid
if self._validate:
+ self._ensure_graph()
actual_ms = self._graph.merge_sort((tip_revision_id,))
actual_ms_iter = iter(actual_ms)
else:
@@ -992,11 +993,13 @@
self._stats['step to latest'] += 1
step_count = 0
start_point = self._imported_mainline_id
+ found = None
while self._imported_mainline_id is not None:
if (base_revno,) in self._known_dotted:
# We have walked far enough to load the original revision,
# which means we've loaded all children.
self._stats['step to latest found base'] += 1
+ found = (base_revno,)
break
# Estimate what is the most recent branch, and see if we have read
# its first revision
@@ -1005,15 +1008,21 @@
# Note: if branch_count == 0, that means we haven't seen any
# other branches for this revision.
if root_of_branch_revno in self._known_dotted:
+ found = root_of_branch_revno
break
self._stats['step mainline to-latest'] += 1
if base_revno == 0:
self._stats['step mainline to-latest NULL'] += 1
self._step_mainline()
step_count += 1
+ return
if step_count > 10:
- import pdb; pdb.set_trace()
- trace.note('stepped %d for %d' % (step_count, base_revno))
+ end_info = ''
+ if start_point is not None:
+ end_info = '%s' % (tuple(self._imported_dotted_revno[start_point][0]),)
+ trace.note('stepped %d for %d, started at %s %s, ended at %s for %s'
+ % (step_count, base_revno, start_point,
+ end_info, self._imported_mainline_id, found))
def _pop_node(self):
"""Move the last node from the _depth_first_stack to _scheduled_stack.
More information about the bazaar-commits
mailing list