520
520
dir_to = br_from.bzrdir.clone(location)
521
521
br_to = dir_to.open_branch()
522
old_rh = br_to.revision_history()
522
count = len(br_to.revision_history())
524
old_rh = br_to.revision_history()
525
tree_to = dir_to.open_workingtree()
526
except errors.NotLocalUrl:
527
# TODO: This should be updated for branches which don't have a
528
# working tree, as opposed to ones where we just couldn't
530
warning('This transport does not update the working '
531
'tree of: %s' % (br_to.base,))
532
count = br_to.pull(br_from, overwrite)
533
except NoWorkingTree:
534
count = br_to.pull(br_from, overwrite)
536
count = tree_to.pull(br_from, overwrite)
537
except DivergedBranches:
538
raise BzrCommandError("These branches have diverged."
539
" Try a merge then push with overwrite.")
527
tree_to = dir_to.open_workingtree()
528
except errors.NotLocalUrl:
529
warning('This transport does not update the working '
530
'tree of: %s' % (br_to.base,))
531
count = br_to.pull(br_from, overwrite)
532
except NoWorkingTree:
533
count = br_to.pull(br_from, overwrite)
535
count = tree_to.pull(br_from, overwrite)
536
except DivergedBranches:
537
raise BzrCommandError("These branches have diverged."
538
" Try a merge then push with overwrite.")
540
539
note('%d revision(s) pushed.' % (count,))