~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/check.py

  • Committer: Vincent Ladeuil
  • Date: 2011-05-26 20:30:53 UTC
  • mfrom: (5920 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5924.
  • Revision ID: v.ladeuil+lp@free.fr-20110526203053-hbjn6yuzwg03wnuv
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
so that when the dependent object is checked, matches can be pulled out and
40
40
evaluated in-line rather than re-reading the same data many times.
41
41
check_refs are tuples (kind, value). Currently defined kinds are:
 
42
 
42
43
* 'trees', where value is a revid and the looked up objects are revision trees.
43
44
* 'lefthand-distance', where value is a revid and the looked up objects are the
44
45
  distance along the lefthand path to NULL for that revid.
53
54
from bzrlib.branch import Branch
54
55
from bzrlib.bzrdir import BzrDir
55
56
from bzrlib.revision import NULL_REVISION
56
 
from bzrlib.symbol_versioning import deprecated_function, deprecated_in
57
57
from bzrlib.trace import note
58
58
from bzrlib.workingtree import WorkingTree
59
59
 
 
60
 
60
61
class Check(object):
61
62
    """Check a repository"""
62
63
 
 
64
    def __init__(self, repository, check_repo=True):
 
65
        self.repository = repository
 
66
 
 
67
    def report_results(self, verbose):
 
68
        raise NotImplementedError(self.report_results)
 
69
 
 
70
 
 
71
class VersionedFileCheck(Check):
 
72
    """Check a versioned file repository"""
 
73
 
63
74
    # The Check object interacts with InventoryEntry.check, etc.
64
75
 
65
76
    def __init__(self, repository, check_repo=True):