~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/send.py

  • Committer: Vincent Ladeuil
  • Date: 2011-05-17 12:12:09 UTC
  • mto: This revision was merged to the branch mainline in revision 5884.
  • Revision ID: v.ladeuil+lp@free.fr-20110517121209-j8so4msanb5ryk04
Fix send --no-remember when no location is set.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
            submit_branch = stored_submit_branch
64
64
            remembered_submit_branch = "submit"
65
65
        else:
66
 
            if stored_submit_branch is None or remember:
 
66
            # Remembers if asked explicitly or no previous location is set
 
67
            if remember or (remember is None and stored_submit_branch is None):
67
68
                branch.set_submit_branch(submit_branch)
68
69
        if submit_branch is None:
69
70
            submit_branch = branch.get_parent()
95
96
        stored_public_branch = branch.get_public_branch()
96
97
        if public_branch is None:
97
98
            public_branch = stored_public_branch
98
 
        elif stored_public_branch is None or remember:
 
99
        # Remembers if asked explicitly or no previous location is set
 
100
        elif (remember
 
101
              or (remember is None and stored_public_branch is None)):
99
102
            branch.set_public_branch(public_branch)
100
103
        if no_bundle and public_branch is None:
101
104
            raise errors.BzrCommandError('No public branch specified or'