reverse merge....

Matthieu Moy Matthieu.Moy at imag.fr
Mon Sep 11 14:50:10 BST 2006


Aaron Bentley <aaron.bentley at utoronto.ca> writes:

> Erik Bågfors wrote:
>> After having some discussions with people that wants to use bzr, it's
>> clear that they want to
>> 1) work in disconnected mode (and not use checkouts and "commit --local")
>> 2) push changes to trunk when they feel like it
>> 3) Not have more than one branch locally
>> 4) Not disrupt history of trunk...
>
> This sounds more like they do want to use checkouts, but don't like the
> default of non-local commits.  If they alias commit to "commit --local",
> then this works:
>
> bzr branch sftp://...../trunk
> cd trunk
> hack hack; commit; commit
> bzr update
> bzr commit --no-local

Indeed, I wonder if it would be worth having a "bzr connect"/"bzr
disconnect" (most likely as a plugin) to say wether commit should be
local or not. I think I would be using it.

> Certainly possible.  I wonder whether bzr merge; bzr pull --overwrite
> could/should achieve this?

I'd say no, since after "bzr merge", you have the remote changes
as pending merges in your tree, not the local ones. But I may have
missed something.

Indeed, a swiss-army-knife would be 
"bzr convert-commits-to-pending-merge -r ...". It could be funny to
have it also (but certainly not in the core, no need to bother the
normal user with one more command).

Then, "merge --reverse" could be built like this:

$ bzr convert-commits-to-pending-merge -r ancestor:remote-branch
$ bzr pull

-- 
Matthieu




More information about the bazaar mailing list