/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: 2009-10-06 14:40:37 UTC
  • mto: (4728.1.2 integration)
  • mto: This revision was merged to the branch mainline in revision 4731.
  • Revision ID: v.ladeuil+lp@free.fr-20091006144037-o76rgosv9hj3td0y
Simplify mutable_tree.has_changes() and update call sites.

* bzrlib/workingtree.py:
(WorkingTree.merge_from_branch): Add a force parameter. Replace
the check_basis() call by the corresponding code, taken the new
'force' parameter into account.

* bzrlib/tests/test_status.py:
(TestStatus.make_multiple_pending_tree): Add force=True on
supplementary merges.

* bzrlib/tests/test_reconfigure.py:
(TestReconfigure): Add a test for pending merges.

* bzrlib/tests/test_msgeditor.py:
(MsgEditorTest.make_multiple_pending_tree): Add force=True on
supplementary merges.

* bzrlib/tests/blackbox/test_uncommit.py:
(TestUncommit.test_uncommit_octopus_merge): Add force=True on
supplementary merges.

* bzrlib/send.py:
(send): Use the simplified has_changes(). Fix typo in comment too.

* bzrlib/reconfigure.py:
(Reconfigure._check): Use the simplified has_changes().

* bzrlib/mutabletree.py:
(MutableTree.has_changes): Make the tree parameter optional but
retain it for tests. Add a pending merges check.

* bzrlib/merge.py:
(Merger.ensure_revision_trees, Merger.file_revisions,
Merger.check_basis, Merger.compare_basis): Deprecate.

* bzrlib/bundle/apply_bundle.py:
(merge_bundle): Replace the check_basis() call by the
corresponding code.

* bzrlib/builtins.py:
(cmd_remove_tree.run, cmd_push.run, cmd_merge.run): Use the
simplified has_changes().
(cmd_merge.run): Replace the check_basis call() by the corresponding
code (minus the alredy done has_changes() check).

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)