~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/check.py

  • Committer: Martin
  • Date: 2010-05-25 17:27:52 UTC
  • mfrom: (5254 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5257.
  • Revision ID: gzlist@googlemail.com-20100525172752-amm089xcikv968sw
Merge bzr.dev to unite with similar changes already made

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, osutils
50
 
from bzrlib import repository as _mod_repository
51
 
from bzrlib import revision
 
49
from bzrlib import errors
52
50
from bzrlib.branch import Branch
53
51
from bzrlib.bzrdir import BzrDir
54
 
from bzrlib.errors import BzrCheckError
55
 
from bzrlib.repository import Repository
56
52
from bzrlib.revision import NULL_REVISION
57
53
from bzrlib.symbol_versioning import deprecated_function, deprecated_in
58
 
from bzrlib.trace import log_error, note
 
54
from bzrlib.trace import note
59
55
import bzrlib.ui
60
56
from bzrlib.workingtree import WorkingTree
61
57
 
192
188
 
193
189
    def _report_repo_results(self, verbose):
194
190
        note('checked repository %s format %s',
195
 
             self.repository.bzrdir.root_transport,
196
 
             self.repository._format)
 
191
            self.repository.user_url,
 
192
            self.repository._format)
197
193
        note('%6d revisions', self.checked_rev_cnt)
198
194
        note('%6d file-ids', len(self.checked_weaves))
199
195
        if verbose:
201
197
                len(self.unreferenced_versions))
202
198
        if verbose and len(self.unreferenced_versions):
203
199
                for file_id, revision_id in self.unreferenced_versions:
204
 
                    log_error('unreferenced version: {%s} in %s', revision_id,
 
200
                    note('unreferenced version: {%s} in %s', revision_id,
205
201
                        file_id)
206
202
        if self.missing_inventory_sha_cnt:
207
203
            note('%6d revisions are missing inventory_sha1',
445
441
                    if do_branch:
446
442
                        scan_branch(branch, needed_refs, to_unlock)
447
443
            if do_branch and not branches:
448
 
                log_error("No branch found at specified location.")
 
444
                note("No branch found at specified location.")
449
445
            if do_tree and base_tree is None and not saw_tree:
450
 
                log_error("No working tree found at specified location.")
 
446
                note("No working tree found at specified location.")
451
447
            if do_repo or do_branch or do_tree:
452
448
                if do_repo:
453
449
                    note("Checking repository at '%s'."
454
 
                         % (repo.bzrdir.root_transport.base,))
 
450
                         % (repo.user_url,))
455
451
                result = repo.check(None, callback_refs=needed_refs,
456
452
                    check_repo=do_repo)
457
453
                result.report_results(verbose)
458
454
        else:
459
455
            if do_tree:
460
 
                log_error("No working tree found at specified location.")
 
456
                note("No working tree found at specified location.")
461
457
            if do_branch:
462
 
                log_error("No branch found at specified location.")
 
458
                note("No branch found at specified location.")
463
459
            if do_repo:
464
 
                log_error("No repository found at specified location.")
 
460
                note("No repository found at specified location.")
465
461
    finally:
466
462
        for thing in to_unlock:
467
463
            thing.unlock()