/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Andrew Bennetts
  • Date: 2008-02-18 08:30:38 UTC
  • mto: This revision was merged to the branch mainline in revision 3756.
  • Revision ID: andrew.bennetts@canonical.com-20080218083038-tts55zsx5xrz3l2e
Lots of assorted hackery to reduce the number of imports for common operations.  Improves 'rocks', 'st' and 'help' times by ~50ms on my laptop.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
# perhaps show them in log -v and allow them as options to the commit command.
19
19
 
20
20
 
 
21
from bzrlib.lazy_import import lazy_import
 
22
lazy_import(globals(), """
 
23
from bzrlib import deprecated_graph
 
24
""")
21
25
from bzrlib import (
22
26
    errors,
23
 
    symbol_versioning
24
 
    )
25
 
from bzrlib.deprecated_graph import (
26
 
    all_descendants,
27
 
    Graph,
28
 
    node_distances,
29
 
    select_farthest,
 
27
    symbol_versioning,
30
28
    )
31
29
from bzrlib.osutils import contains_whitespace
32
30
from bzrlib.progress import DummyProgress
308
306
            raise errors.NoCommonAncestor(revision_a, revision_b)
309
307
            
310
308
        pb.update('Picking ancestor', 2, 3)
311
 
        distances = node_distances (descendants, ancestors, root)
 
309
        distances = deprecated_graph.node_distances(
 
310
            descendants, ancestors, root)
312
311
        pb.update('Picking ancestor', 3, 2)
313
 
        farthest = select_farthest(distances, common)
 
312
        farthest = deprecated_graph.select_farthest(distances, common)
314
313
        if farthest is None or farthest == NULL_REVISION:
315
314
            raise errors.NoCommonAncestor(revision_a, revision_b)
316
315
    finally:
399
398
                                            revision_id)
400
399
 
401
400
        # combine the graphs
402
 
        result = Graph()
 
401
        result = deprecated_graph.Graph()
403
402
        pending = set(revision_ids)
404
403
        done = set()
405
404
        def find_parents(node_id):