/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/builtins.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:
604
604
            tree_to = None
605
605
            branch_to = Branch.open_containing(directory)[0]
606
606
 
 
607
        possible_transports = []
607
608
        if location is not None:
608
609
            mergeable, location_transport = _get_mergeable_helper(location)
 
610
            possible_transports.append(location_transport)
609
611
 
610
612
        stored_loc = branch_to.get_parent()
611
613
        if location is None:
617
619
                        self.outf.encoding)
618
620
                self.outf.write("Using saved location: %s\n" % display_url)
619
621
                location = stored_loc
620
 
                location_transport = transport.get_transport(location)
 
622
                location_transport = transport.get_transport(
 
623
                    location, possible_transports=possible_transports)
621
624
 
622
625
        if mergeable is not None:
623
626
            if revision is not None:
643
646
        if verbose:
644
647
            old_rh = branch_to.revision_history()
645
648
        if tree_to is not None:
 
649
            change_reporter = delta._ChangeReporter(
 
650
                unversioned_filter=tree_to.is_ignored)
646
651
            result = tree_to.pull(branch_from, overwrite, revision_id,
647
 
                delta._ChangeReporter(unversioned_filter=tree_to.is_ignored))
 
652
                                  change_reporter,
 
653
                                  possible_transports=possible_transports)
648
654
        else:
649
655
            result = branch_to.pull(branch_from, overwrite, revision_id)
650
656
 
2251
2257
        return '\n'.join(properties)
2252
2258
 
2253
2259
    def run(self, message=None, file=None, verbose=False, selected_list=None,
2254
 
            unchanged=False, strict=False, local=False, fixes=None,
 
2260
            unchanged=False, strict=False, local=False, fixes=[],
2255
2261
            author=None, show_diff=False):
2256
2262
        from bzrlib.commit import (
2257
2263
            NullCommitReporter,