~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: John Arbash Meinel
  • Date: 2005-12-01 01:31:32 UTC
  • mto: (1185.50.4 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1519.
  • Revision ID: john@arbash-meinel.com-20051201013132-76797e2be4758e1c
Adding tests for remote sftp branches without working trees, plus a bugfix to allow push to still work with a warning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
478
478
                            raise BzrCommandError("Could not creeate "
479
479
                                                  "path prefix.")
480
480
            br_to = Branch.initialize(location)
 
481
        old_rh = br_to.revision_history()
481
482
        try:
482
 
            old_rh = br_to.revision_history()
483
 
            count = br_to.pull(br_from, overwrite)
 
483
            try:
 
484
                tree_to = br_to.working_tree()
 
485
            except NoWorkingTree:
 
486
                # TODO: This should be updated for branches which don't have a
 
487
                # working tree, as opposed to ones where we just couldn't 
 
488
                # update the tree.
 
489
                warning('Unable to update the working tree of: %s' % (br_to.base,))
 
490
                count = br_to.pull(br_from, overwrite)
 
491
            else:
 
492
                count = tree_to.pull(br_from, overwrite)
484
493
        except DivergedBranches:
485
494
            raise BzrCommandError("These branches have diverged."
486
495
                                  "  Try a merge then push with overwrite.")