~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Olaf Conradi
  • Date: 2006-03-29 00:43:54 UTC
  • mto: (1661.1.1 bzr.mbp.remember)
  • mto: This revision was merged to the branch mainline in revision 1663.
  • Revision ID: olaf@conradi.org-20060329004354-bfa27afb37ff0c1f
Added testcases for using push with --remember. Moved remember code to
beginning of cmd_push. This remembers the location in case of a failure
during push.

Show diffs side-by-side

added added

removed removed

Lines of Context:
494
494
            else:
495
495
                print "Using saved location: %s" % stored_loc
496
496
                location = stored_loc
 
497
        if br_from.get_push_location() is None or remember:
 
498
            br_from.set_push_location(location)
497
499
        try:
498
500
            dir_to = bzrlib.bzrdir.BzrDir.open(location)
499
501
            br_to = dir_to.open_branch()
540
542
        except DivergedBranches:
541
543
            raise BzrCommandError("These branches have diverged."
542
544
                                  "  Try a merge then push with overwrite.")
543
 
        if br_from.get_push_location() is None or remember:
544
 
            br_from.set_push_location(location)
545
545
        note('%d revision(s) pushed.' % (count,))
546
546
 
547
547
        if verbose: