~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Vincent Ladeuil
  • Date: 2011-05-14 14:09:09 UTC
  • mto: This revision was merged to the branch mainline in revision 5876.
  • Revision ID: v.ladeuil+lp@free.fr-20110514140909-evshhzlg3ib8mp06
Don't set submit_branch if it's not yet set when merging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3931
3931
    ]
3932
3932
 
3933
3933
    def run(self, location=None, revision=None, force=False,
3934
 
            merge_type=None, show_base=False, reprocess=None, remember=False,
 
3934
            merge_type=None, show_base=False, reprocess=None, remember=None,
3935
3935
            uncommitted=False, pull=False,
3936
3936
            directory=None,
3937
3937
            preview=False,
4114
4114
        if other_revision_id is None:
4115
4115
            other_revision_id = _mod_revision.ensure_null(
4116
4116
                other_branch.last_revision())
4117
 
        # Remember where we merge from
4118
 
        if ((remember or tree.branch.get_submit_branch() is None) and
4119
 
             user_location is not None):
 
4117
        # Remember where we merge from. We need to remember if:
 
4118
        # - user specify a location (and we don't merge from the parent
 
4119
        #   branch)
 
4120
        # - user ask to remember or there is no previous location set to merge
 
4121
        #   from and user didn't ask to *not* remember
 
4122
        if (user_location is not None
 
4123
            and ((remember
 
4124
                  or (remember is None
 
4125
                      and tree.branch.get_submit_branch() is None)))):
4120
4126
            tree.branch.set_submit_branch(other_branch.base)
4121
4127
        # Merge tags (but don't set them in the master branch yet, the user
4122
4128
        # might revert this merge).  Commit will propagate them.