~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-08-24 03:16:12 UTC
  • mfrom: (2745.1.2 devil)
  • Revision ID: pqm@pqm.ubuntu.com-20070824031612-53wd9sywqa4zima5
(robertc) Add a number of -Devil checks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from bzrlib import (
25
25
    bzrdir,
26
26
    check,
 
27
    debug,
27
28
    deprecated_graph,
28
29
    errors,
29
30
    generate_ids,
45
46
from bzrlib.store.versioned import VersionedFileStore
46
47
from bzrlib.store.text import TextStore
47
48
from bzrlib.testament import Testament
48
 
 
49
49
""")
50
50
 
51
51
from bzrlib.decorators import needs_read_lock, needs_write_lock
54
54
from bzrlib.symbol_versioning import (
55
55
        deprecated_method,
56
56
        )
57
 
from bzrlib.trace import mutter, note, warning
 
57
from bzrlib.trace import mutter, mutter_callsite, note, warning
58
58
 
59
59
 
60
60
# Old formats display a warning, but only once
545
545
    @needs_read_lock
546
546
    def has_revision(self, revision_id):
547
547
        """True if this repository has a copy of the revision."""
 
548
        if 'evil' in debug.debug_flags:
 
549
            mutter_callsite(2, "has_revision is a LBYL symptom.")
548
550
        revision_id = osutils.safe_revision_id(revision_id)
549
551
        return self._revision_store.has_revision_id(revision_id,
550
552
                                                    self.get_transaction())
870
872
        operation and will be removed in the future.
871
873
        :return: a dictionary of revision_id->revision_parents_list.
872
874
        """
 
875
        if 'evil' in debug.debug_flags:
 
876
            mutter_callsite(2,
 
877
                "get_revision_graph scales with size of history.")
873
878
        # special case NULL_REVISION
874
879
        if revision_id == _mod_revision.NULL_REVISION:
875
880
            return {}
902
907
        :param revision_ids: an iterable of revisions to graph or None for all.
903
908
        :return: a Graph object with the graph reachable from revision_ids.
904
909
        """
 
910
        if 'evil' in debug.debug_flags:
 
911
            mutter_callsite(2,
 
912
                "get_revision_graph_with_ghosts scales with size of history.")
905
913
        result = deprecated_graph.Graph()
906
914
        if not revision_ids:
907
915
            pending = set(self.all_revision_ids())