Rev 448: Clean up the code, removing the debugging stuff. in http://bazaar.launchpad.net/~jameinel/loggerhead/fast_merged_into_revs
John Arbash Meinel
john at arbash-meinel.com
Thu Jan 27 23:02:34 UTC 2011
At http://bazaar.launchpad.net/~jameinel/loggerhead/fast_merged_into_revs
------------------------------------------------------------
revno: 448
revision-id: john at arbash-meinel.com-20110127230222-bhmb6nqglyqmyalq
parent: john at arbash-meinel.com-20110127230120-sqwopu3i5ic6rfr1
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: fast_merged_into_revs
timestamp: Thu 2011-01-27 17:02:22 -0600
message:
Clean up the code, removing the debugging stuff.
-------------- next part --------------
=== modified file 'loggerhead/history.py'
--- a/loggerhead/history.py 2011-01-27 23:01:20 +0000
+++ b/loggerhead/history.py 2011-01-27 23:02:22 +0000
@@ -30,11 +30,9 @@
import datetime
import logging
import os
-import pprint
import re
import textwrap
import threading
-import time
from bzrlib import (
graph,
@@ -332,19 +330,17 @@
revid_set = set(revid_list)
# TODO: We need tests for when start_revid != self.last_revision
- t = time.clock()
# TODO: Update history_db to have the exact query we want. Right now
# we're passing over the history a couple of times, which is
- # pretty wasteful.
+ # pretty wasteful. All we really need is the ordered mainline
+ # information, which should be cheap to produce. We don't have to
+ # reduce the set, we don't have to do a lot of stuff.
mainline_revs = self._querier.get_mainline_where_merged(revid_list)
mainline_revids = set(mainline_revs.itervalues())
mainline_revnos = self._querier.get_dotted_revnos(mainline_revids)
revno_ordered = sorted([(revno[0], rev_id) for rev_id, revno
in mainline_revnos.iteritems()],
reverse=True)
- t = time.clock() - t
- self.log.info('%.3fs get_mainline_where_merged returned %s'
- % (t, pprint.pformat(mainline_revs)))
for _, rev_id in revno_ordered:
yield rev_id
return
More information about the bazaar-commits
mailing list