~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Michael Ellerman
  • Date: 2005-12-10 22:11:13 UTC
  • mto: This revision was merged to the branch mainline in revision 1528.
  • Revision ID: michael@ellerman.id.au-20051210221113-99ca561aaab4661e
Simplify handling of DivergedBranches in cmd_pull()

Show diffs side-by-side

added added

removed removed

Lines of Context:
384
384
            else:
385
385
                print "Using saved location: %s" % stored_loc
386
386
                location = stored_loc
 
387
 
387
388
        br_from = Branch.open(location)
388
389
        br_to = tree_to.branch
389
 
        try:
390
 
            old_rh = br_to.revision_history()
391
 
            count = tree_to.pull(br_from, overwrite)
392
 
        except DivergedBranches:
393
 
            # FIXME: Just make DivergedBranches display the right message
394
 
            # itself.
395
 
            raise BzrCommandError("These branches have diverged."
396
 
                                  "  Try merge.")
 
390
 
 
391
        old_rh = br_to.revision_history()
 
392
        count = tree_to.pull(br_from, overwrite)
 
393
 
397
394
        if br_to.get_parent() is None or remember:
398
395
            br_to.set_parent(location)
399
396
        note('%d revision(s) pulled.' % (count,))