~mnordhoff/loggerhead/statictuples

« back to all changes in this revision

Viewing changes to loggerhead/wholehistory.py

  • Committer: Matt Nordhoff
  • Date: 2009-10-27 15:08:22 UTC
  • Revision ID: mnordhoff@mattnordhoff.com-20091027150822-5da4ryd7nh0savtn
Ehh, convert the iter_ancestry thing back to a generator expression.

It's a lot of data, and besides, one little function call is nothing compared to the rest of what iter_ancestry is doing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    # it's only on CHK repos, and we have to be compatible with older bzrlibs
59
59
    # anyway.
60
60
    as_st = StaticTuple.from_sequence
61
 
    parent_map = dict([(key, as_st(value)) for key, value in
62
 
        graph.iter_ancestry([last_revid]) if value is not None])
 
61
    parent_map = dict((key, as_st(value)) for key, value in
 
62
        graph.iter_ancestry([last_revid]) if value is not None)
63
63
 
64
64
    _revision_graph = _strip_NULL_ghosts(parent_map)
65
65