~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/check.py

  • Committer: John Arbash Meinel
  • Date: 2009-02-23 15:29:35 UTC
  • mfrom: (3943.7.7 bzr.code_style_cleanup)
  • mto: This revision was merged to the branch mainline in revision 4033.
  • Revision ID: john@arbash-meinel.com-20090223152935-oel9m92mwcc6nb4h
Merge the removal of all trailing whitespace, and resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
# TODO: Check for extra files in the control directory.
23
23
 
24
 
# TODO: Check revision, inventory and entry objects have all 
 
24
# TODO: Check revision, inventory and entry objects have all
25
25
# required fields.
26
26
 
27
27
# TODO: Get every revision in the revision-store even if they're not
166
166
        rev_id - the one to check
167
167
        """
168
168
        rev = self.repository.get_revision(rev_id)
169
 
                
 
169
 
170
170
        if rev.revision_id != rev_id:
171
171
            raise BzrCheckError('wrong internal revision id in revision {%s}'
172
172
                                % rev_id)
181
181
                if self.repository.has_revision(parent):
182
182
                    missing_ancestry = self.repository.get_ancestry(parent)
183
183
                    for missing in missing_ancestry:
184
 
                        if (missing is not None 
 
184
                        if (missing is not None
185
185
                            and missing not in self.planned_revisions):
186
186
                            self.planned_revisions.append(missing)
187
187
                else:
244
244
@deprecated_function(deprecated_in((1,6,0)))
245
245
def check(branch, verbose):
246
246
    """Run consistency checks on a branch.
247
 
    
 
247
 
248
248
    Results are reported through logging.
249
 
    
 
249
 
250
250
    Deprecated in 1.6.  Please use check_branch instead.
251
251
 
252
252
    :raise BzrCheckError: if there's a consistency error.
278
278
 
279
279
    if do_tree:
280
280
        if tree is not None:
281
 
            note("Checking working tree at '%s'." 
 
281
            note("Checking working tree at '%s'."
282
282
                 % (tree.bzrdir.root_transport.base,))
283
283
            tree._check()
284
284
        else: