[ Cc-ing the list again. I suppose you just forgot to repy-_all_ ]

Stephen Leake <[EMAIL PROTECTED]> writes:

> Matthieu Moy <[EMAIL PROTECTED]> writes:
>
>> Stephen Leake <[EMAIL PROTECTED]> writes:
>>
>>> A related issue is whether 'bzr-pull' should be on the menu; is it
>>> ever appropriate to run 'bzr pull' rather than 'bzr merge --pull'?
>>
>> $ bzr pull
>>
>> means "make my local branch a mirror of the remote". Typically, I have
>> a mirror of Stefan's branch, and I use "bzr pull" in it.
>
> Right.
>
> But if you used 'bzr merge --pull' here, would that do the right
> thing?
>
>> $ bzr merge
>>
>> means : take the remote changes, and incoporate them in my local tree.
>> I'll commit them afterwards. That's typically usefull when you have a
>> topic branch, and you want to give it a global commit message in your
>> main branch.
>
> Right.
>
>> $ bzr merge --pull
>>
>> will also take the remote changes, but depending on the shape of
>> history, will end up like a pull (several commits added to your local
>> branch), or a merge (a set of commits, that you'll have to commit as a
>> "merge commit").
>>
>> There are use-cases and good reasons for the 3 of them.
>
> I see the different use cases for "just a mirror - no local changes"
> as opposed to "working branch - local changes". But it seems 'bzr
> merge --pull' is an acceptable command in each case.

The result when the command "succeeds" is the same, but the way it
"fails" is different.

If I run "bzr pull" on my mirror of Stefan's branch, if I happen to
have a local commit on my mirror (this is most likely a mistake from
my part, but can happen also if Stefan used "uncommit" on his branch
for example), I expect the tool to tell me "hey, what's up? You can't
pull here!" not "That's OK, I just merged all your changes, you should
commit them now".

If I run "bzr merge" on my branch, I expect the tool to fetch all the
changes to my branch. Now, the --pull is a kind of optimization
(that's called "fast-forward" in git). I the case where I haven't got
any unmerged commit, the tool tells me "OK, you're in sync with Stefan
now".

-- 
Matthieu

_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev

Reply via email to