/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: John Arbash Meinel
  • Date: 2009-11-06 18:05:03 UTC
  • mto: This revision was merged to the branch mainline in revision 4814.
  • Revision ID: john@arbash-meinel.com-20091106180503-q3hcg1nxmut5b2cb
Stop holding the gil while extracting data.

Previous experience has shown that we don't really spend a lot
of time here, but there isn't any reason to hold the lock while
we do it anyway.

Performance testing has shown that for bzr operations 'with nogil'
doesn't really do much, which was generally expected. Any variation
observed is within the noise margins.

This is mostly about 'the right thing to do', and potential
future work where we may actually use threads.

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)