/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: INADA Naoki
  • Date: 2011-05-18 06:27:34 UTC
  • mfrom: (5887 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5894.
  • Revision ID: songofacandy@gmail.com-20110518062734-1ilhll0rrqyyp8um
merge from lp:bzr and resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
962
962
    match the remote one, use pull --overwrite. This will work even if the two
963
963
    branches have diverged.
964
964
 
965
 
    If there is no default location set, the first pull will set it.  After
966
 
    that, you can omit the location to use the default.  To change the
967
 
    default, use --remember. The value will only be saved if the remote
968
 
    location can be accessed.
 
965
    If there is no default location set, the first pull will set it (use
 
966
    --no-remember to avoid settting it). After that, you can omit the
 
967
    location to use the default.  To change the default, use --remember. The
 
968
    value will only be saved if the remote location can be accessed.
969
969
 
970
970
    Note: The location can be specified either in the form of a branch,
971
971
    or in the form of a path to a file containing a merge directive generated
990
990
    takes_args = ['location?']
991
991
    encoding_type = 'replace'
992
992
 
993
 
    def run(self, location=None, remember=False, overwrite=False,
 
993
    def run(self, location=None, remember=None, overwrite=False,
994
994
            revision=None, verbose=False,
995
995
            directory=None, local=False,
996
996
            show_base=False):
1047
1047
            branch_from = Branch.open(location,
1048
1048
                possible_transports=possible_transports)
1049
1049
            self.add_cleanup(branch_from.lock_read().unlock)
1050
 
 
1051
 
            if branch_to.get_parent() is None or remember:
 
1050
            # Remembers if asked explicitly or no previous location is set
 
1051
            if (remember
 
1052
                or (remember is None and branch_to.get_parent() is None)):
1052
1053
                branch_to.set_parent(branch_from.base)
1053
1054
 
1054
1055
        if revision is not None:
1098
1099
    do a merge (see bzr help merge) from the other branch, and commit that.
1099
1100
    After that you will be able to do a push without '--overwrite'.
1100
1101
 
1101
 
    If there is no default push location set, the first push will set it.
1102
 
    After that, you can omit the location to use the default.  To change the
1103
 
    default, use --remember. The value will only be saved if the remote
1104
 
    location can be accessed.
 
1102
    If there is no default push location set, the first push will set it (use
 
1103
    --no-remember to avoid settting it).  After that, you can omit the
 
1104
    location to use the default.  To change the default, use --remember. The
 
1105
    value will only be saved if the remote location can be accessed.
1105
1106
    """
1106
1107
 
1107
1108
    _see_also = ['pull', 'update', 'working-trees']
1135
1136
    takes_args = ['location?']
1136
1137
    encoding_type = 'replace'
1137
1138
 
1138
 
    def run(self, location=None, remember=False, overwrite=False,
 
1139
    def run(self, location=None, remember=None, overwrite=False,
1139
1140
        create_prefix=False, verbose=False, revision=None,
1140
1141
        use_existing_dir=False, directory=None, stacked_on=None,
1141
1142
        stacked=False, strict=None, no_tree=False):
3846
3847
    through OTHER, excluding BASE but including OTHER, will be merged.  If this
3847
3848
    causes some revisions to be skipped, i.e. if the destination branch does
3848
3849
    not already contain revision BASE, such a merge is commonly referred to as
3849
 
    a "cherrypick".
 
3850
    a "cherrypick". Unlike a normal merge, Bazaar does not currently track
 
3851
    cherrypicks. The changes look like a normal commit, and the history of the
 
3852
    changes from the other branch is not stored in the commit.
3850
3853
 
3851
3854
    Revision numbers are always relative to the source branch.
3852
3855
 
3857
3860
 
3858
3861
    Use bzr resolve when you have fixed a problem.  See also bzr conflicts.
3859
3862
 
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.
 
3863
    If there is no default branch set, the first merge will set it (use
 
3864
    --no-remember to avoid settting it). After that, you can omit the branch
 
3865
    to use the default.  To change the default, use --remember. The value will
 
3866
    only be saved if the remote location can be accessed.
3864
3867
 
3865
3868
    The results of the merge are placed into the destination working
3866
3869
    directory, where they can be reviewed (with bzr diff), tested, and then
3931
3934
    ]
3932
3935
 
3933
3936
    def run(self, location=None, revision=None, force=False,
3934
 
            merge_type=None, show_base=False, reprocess=None, remember=False,
 
3937
            merge_type=None, show_base=False, reprocess=None, remember=None,
3935
3938
            uncommitted=False, pull=False,
3936
3939
            directory=None,
3937
3940
            preview=False,
4114
4117
        if other_revision_id is None:
4115
4118
            other_revision_id = _mod_revision.ensure_null(
4116
4119
                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):
 
4120
        # Remember where we merge from. We need to remember if:
 
4121
        # - user specify a location (and we don't merge from the parent
 
4122
        #   branch)
 
4123
        # - user ask to remember or there is no previous location set to merge
 
4124
        #   from and user didn't ask to *not* remember
 
4125
        if (user_location is not None
 
4126
            and ((remember
 
4127
                  or (remember is None
 
4128
                      and tree.branch.get_submit_branch() is None)))):
4120
4129
            tree.branch.set_submit_branch(other_branch.base)
4121
4130
        # Merge tags (but don't set them in the master branch yet, the user
4122
4131
        # might revert this merge).  Commit will propagate them.
5281
5290
    source branch defaults to that containing the working directory, but can
5282
5291
    be changed using --from.
5283
5292
 
 
5293
    Both the submit branch and the public branch follow the usual behavior with
 
5294
    respect to --remember: If there is no default location set, the first send
 
5295
    will set it (use --no-remember to avoid settting it). After that, you can
 
5296
    omit the location to use the default.  To change the default, use
 
5297
    --remember. The value will only be saved if the location can be accessed.
 
5298
 
5284
5299
    In order to calculate those changes, bzr must analyse the submit branch.
5285
5300
    Therefore it is most efficient for the submit branch to be a local mirror.
5286
5301
    If a public location is known for the submit_branch, that location is used
5355
5370
        ]
5356
5371
 
5357
5372
    def run(self, submit_branch=None, public_branch=None, no_bundle=False,
5358
 
            no_patch=False, revision=None, remember=False, output=None,
 
5373
            no_patch=False, revision=None, remember=None, output=None,
5359
5374
            format=None, mail_to=None, message=None, body=None,
5360
5375
            strict=None, **kwargs):
5361
5376
        from bzrlib.send import send