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

  • Committer: Vincent Ladeuil
  • Date: 2007-09-18 20:04:21 UTC
  • mto: (2885.1.1 140432)
  • mto: This revision was merged to the branch mainline in revision 2886.
  • Revision ID: v.ladeuil+lp@free.fr-20070918200421-9e5bkyohebe2h0eg
Add tests for commit, reuse master branch transport.

* bzrlib/workingtree.py:
(WorkingTree.pull): Add a possible_transports parameter, forward
it to branch.pull.

* bzrlib/branch.py:
(Branch.pull, BzrBranch.pull, BzrBranch5.pull): Add a
possible_transports parameter.
(BzrBranch5.pull): Make master branch transport added to
possible_transports

* bzrlib/tests/commands/test_commit.py: 
New file testing against multiple connections during commit.

* bzrlib/builtins.py:
(cmd_pull.run): Allows master branch transports to be reused.
(cmd_commit): 'fixes' is a ListOption, its default value should
be [].


* bzrlib/tests/commands/test_pull.py: 
Fix import statements.
(TestPull.test_pull_with_bound_branch): New test.

* bzrlib/tests/commands/__init__.py:
(test_suite): Add test_commit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1462
1462
 
1463
1463
    @needs_write_lock
1464
1464
    def pull(self, source, overwrite=False, stop_revision=None,
1465
 
             change_reporter=None):
 
1465
             change_reporter=None, possible_transports=None):
1466
1466
        top_pb = bzrlib.ui.ui_factory.nested_progress_bar()
1467
1467
        source.lock_read()
1468
1468
        try:
1470
1470
            pp.next_phase()
1471
1471
            old_revision_info = self.branch.last_revision_info()
1472
1472
            basis_tree = self.basis_tree()
1473
 
            count = self.branch.pull(source, overwrite, stop_revision)
 
1473
            count = self.branch.pull(source, overwrite, stop_revision,
 
1474
                                     possible_transports=possible_transports)
1474
1475
            new_revision_info = self.branch.last_revision_info()
1475
1476
            if new_revision_info != old_revision_info:
1476
1477
                pp.next_phase()