~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/weave.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-10-01 07:56:03 UTC
  • mfrom: (3224.5.40 faster-startup)
  • Revision ID: pqm@pqm.ubuntu.com-20081001075603-s9nynw8y85fmrprj
Reduce startup time by a small amount. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
import time
75
75
import warnings
76
76
 
 
77
from bzrlib.lazy_import import lazy_import
 
78
lazy_import(globals(), """
 
79
from bzrlib import tsort
 
80
""")
77
81
from bzrlib import (
78
82
    progress,
79
83
    )
90
94
from bzrlib.revision import NULL_REVISION
91
95
from bzrlib.symbol_versioning import *
92
96
from bzrlib.trace import mutter
93
 
from bzrlib.tsort import topo_sort
94
97
from bzrlib.versionedfile import (
95
98
    AbsentContentFactory,
96
99
    adapter_registry,
312
315
        versions = [version[-1] for version in versions]
313
316
        if ordering == 'topological':
314
317
            parents = self.get_parent_map(versions)
315
 
            new_versions = topo_sort(parents)
 
318
            new_versions = tsort.topo_sort(parents)
316
319
            new_versions.extend(set(versions).difference(set(parents)))
317
320
            versions = new_versions
318
321
        for version in versions:
994
997
    # map from version name -> all parent names
995
998
    combined_parents = _reweave_parent_graphs(wa, wb)
996
999
    mutter("combined parents: %r", combined_parents)
997
 
    order = topo_sort(combined_parents.iteritems())
 
1000
    order = tsort.topo_sort(combined_parents.iteritems())
998
1001
    mutter("order to reweave: %r", order)
999
1002
 
1000
1003
    if pb and not msg: