colocated branches and auto nicknaming may solve merge&push problem.
INADA Naoki
songofacandy at gmail.com
Sat Feb 13 10:07:57 GMT 2010
On Wed, Feb 10, 2010 at 10:22 AM, Martin Pool <mbp at canonical.com> wrote:
> On 8 February 2010 17:56, INADA Naoki <songofacandy at gmail.com> wrote:
>> But naming branch by hand should not be required for just a merging.
>> I think auto naming is good to solve such a problem.
>>
>> 1. "bzr pull BRANCH" stores current branch if two branches are diverged and
>> current tree is colocated. Current nick used for the stored branch.
>> If current
>> nick conflicts against other colocated branches' nick, nick is
>> autonumbered like
>> "somenick-1"
>> 2. "bzr merge colo:nick" (1&2 in one "pull --merge" command seems good for me)
>> 3. "bzr commit -m "merge some improvements.""
>> 4. "bzr push"
>>
>> I prefer this workflow.
>> Any suggestion about auto-nicknaming?
>
> It's an interesting model. bzr pull already has a defined behaviour
> in the case of divergence, but I think it could usefully have at least
> an option to pull the diverged changes into a colocated branch.
> Alternatively, maybe bzr merge make a name available for the merged in
> branch. (You could have a namespace pending:1 meaning the pending
> merged branch.)
>
> So what is it that you like about this model? That you can do the
> pull separately from the merge, without specifically creating a mirror
> of the other branch?
>
I feel "pending:1" is good.
But is it a temporary name?
I hate I lose a branch.
I think following usecase.
1. In workingtree on local feature branch,
$ bzr merge --land URL_TO_TRUNK # (--into or any other good name)
makes "pending: 1" as feature branch and current workingtree as TRUNK checkout.
2a. commit with "bzr commit". The left-most-revision is a head of TRUNK.
3a. bzr push
Good. On the case of "revert"
2b. "bzr revert" rollback to pre (1). Revert shouldn't remove feature branch.
Next, in the case of I forget "--into" option and resolve many conflicts...
1. "bzr merge URL_TO_TRUNK"
2. "bzr resolve a b c"
3. "bzr commit"
# Wow! I forgot "--land"
4. "bzr uncommit"
5. "bzr land pending:1" # land command replace left-most-revision
6a. "bzr commit"
6b. "bzr revert"
--
INADA Naoki <songofacandy at gmail.com>
More information about the bazaar
mailing list