~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

(vila) ``bzr merge --no-remember location`` never sets ``submit_branch``
 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3857
3857
 
3858
3858
    Use bzr resolve when you have fixed a problem.  See also bzr conflicts.
3859
3859
 
3860
 
    If there is no default branch set, the first merge will set it. After
3861
 
    that, you can omit the branch to use the default.  To change the
3862
 
    default, use --remember. The value will only be saved if the remote
3863
 
    location can be accessed.
 
3860
    If there is no default branch set, the first merge will set it (use
 
3861
    --no-remember to *not* set it). After that, you can omit the branch to use
 
3862
    the default.  To change the default, use --remember. The value will only be
 
3863
    saved if the remote location can be accessed.
3864
3864
 
3865
3865
    The results of the merge are placed into the destination working
3866
3866
    directory, where they can be reviewed (with bzr diff), tested, and then
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.