/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/check.py

  • Committer: Vincent Ladeuil
  • Date: 2010-01-25 15:55:48 UTC
  • mto: (4985.1.4 add-attr-cleanup)
  • mto: This revision was merged to the branch mainline in revision 4988.
  • Revision ID: v.ladeuil+lp@free.fr-20100125155548-0l352pujvt5bzl5e
Deploy addAttrCleanup on the whole test suite.

Several use case worth mentioning:

- setting a module or any other object attribute is the majority
by far. In some cases the setting itself is deferred but most of
the time we want to set at the same time we add the cleanup.

- there multiple occurrences of protecting hooks or ui factory
which are now useless (the test framework takes care of that now),

- there was some lambda uses that can now be avoided.

That first cleanup already simplifies things a lot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
  indicating that the revision was found/not found.
47
47
"""
48
48
 
49
 
from bzrlib import errors
 
49
from bzrlib import errors, osutils
 
50
from bzrlib import repository as _mod_repository
 
51
from bzrlib import revision
50
52
from bzrlib.branch import Branch
51
53
from bzrlib.bzrdir import BzrDir
 
54
from bzrlib.errors import BzrCheckError
 
55
from bzrlib.repository import Repository
52
56
from bzrlib.revision import NULL_REVISION
53
57
from bzrlib.symbol_versioning import deprecated_function, deprecated_in
54
58
from bzrlib.trace import note
188
192
 
189
193
    def _report_repo_results(self, verbose):
190
194
        note('checked repository %s format %s',
191
 
            self.repository.user_url,
192
 
            self.repository._format)
 
195
             self.repository.bzrdir.root_transport,
 
196
             self.repository._format)
193
197
        note('%6d revisions', self.checked_rev_cnt)
194
198
        note('%6d file-ids', len(self.checked_weaves))
195
199
        if verbose:
447
451
            if do_repo or do_branch or do_tree:
448
452
                if do_repo:
449
453
                    note("Checking repository at '%s'."
450
 
                         % (repo.user_url,))
 
454
                         % (repo.bzrdir.root_transport.base,))
451
455
                result = repo.check(None, callback_refs=needed_refs,
452
456
                    check_repo=do_repo)
453
457
                result.report_results(verbose)