46
46
bailout('repeated revision {%s}' % rid)
47
47
checked_revs.add(rid)
49
## TODO: Check all the required fields are present on the revision.
51
inv = branch.get_inventory(rev.inventory_id)
52
check_inventory(branch, inv)
51
54
mutter('branch %s is OK' % branch.base)
53
## TODO: Check that previous-inventory and previous-manifest
54
## are the same as those stored in the previous changeset.
56
## TODO: Check all patches present in patch directory are
57
## mentioned in patch history; having an orphaned patch only gives
60
## TODO: Check cached data is consistent with data reconstructed
63
## TODO: Check no control files are versioned.
65
## TODO: Check that the before-hash of each file in a later
66
## revision matches the after-hash in the previous revision to
70
def check_inventory():
71
mutter("checking inventory file and ids...")
58
def check_inventory(branch, inv):
75
for l in controlfile('inventory').readlines():
78
bailout("malformed inventory line: " + `l`)
81
if file_id in seen_ids:
82
bailout("duplicated file id " + file_id)
85
if name in seen_names:
86
bailout("duplicated file name in inventory: " + quotefn(name))
62
for path, ie in inv.iter_entries():
63
if path in seen_names:
64
bailout('duplicated path %r in inventory' % path)
67
if not ie.text_id in branch.text_store:
68
bailout('text {%s} not in text_store' % ie.text_id)
89
if is_control_file(name):
90
raise BzrError("control file %s present in inventory" % quotefn(name))