~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/groupcompress.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-04-16 01:09:56 UTC
  • mfrom: (5784.1.4 760435-less-fail)
  • Revision ID: pqm@pqm.ubuntu.com-20110416010956-5wrpm136qq2hz5f3
(mbp) rename and deprecate failUnlessExists and failIfExists (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
except ImportError:
24
24
    pylzma = None
25
25
 
26
 
from bzrlib.lazy_import import lazy_import
27
 
lazy_import(globals(), """
28
26
from bzrlib import (
29
27
    annotate,
30
28
    debug,
31
29
    errors,
32
30
    graph as _mod_graph,
 
31
    knit,
33
32
    osutils,
34
33
    pack,
35
34
    static_tuple,
36
35
    trace,
37
 
    tsort,
38
36
    )
39
 
 
40
 
from bzrlib.repofmt import pack_repo
41
 
""")
42
 
 
43
37
from bzrlib.btree_index import BTreeBuilder
44
38
from bzrlib.lru_cache import LRUSizeCache
 
39
from bzrlib.repofmt import pack_repo
 
40
from bzrlib.tsort import topo_sort
45
41
from bzrlib.versionedfile import (
46
 
    _KeyRefs,
47
42
    adapter_registry,
48
43
    AbsentContentFactory,
49
44
    ChunkedContentFactory,
83
78
 
84
79
    present_keys = []
85
80
    for prefix in sorted(per_prefix_map):
86
 
        present_keys.extend(reversed(tsort.topo_sort(per_prefix_map[prefix])))
 
81
        present_keys.extend(reversed(topo_sort(per_prefix_map[prefix])))
87
82
    return present_keys
88
83
 
89
84
 
1476
1471
            the defined order, regardless of source.
1477
1472
        """
1478
1473
        if ordering == 'topological':
1479
 
            present_keys = tsort.topo_sort(parent_map)
 
1474
            present_keys = topo_sort(parent_map)
1480
1475
        else:
1481
1476
            # ordering == 'groupcompress'
1482
1477
            # XXX: This only optimizes for the target ordering. We may need
1927
1922
        # repeated over and over, this creates a surplus of ints
1928
1923
        self._int_cache = {}
1929
1924
        if track_external_parent_refs:
1930
 
            self._key_dependencies = _KeyRefs(
 
1925
            self._key_dependencies = knit._KeyRefs(
1931
1926
                track_new_keys=track_new_keys)
1932
1927
        else:
1933
1928
            self._key_dependencies = None