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