[RFC] I want to disable submit_branch on my computer for all branches. How can I do that?
Aaron Bentley
aaron at aaronbentley.com
Thu May 12 19:24:43 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11-05-12 06:19 AM, Alexander Belchenko wrote:
> submit_branch could be useful only for feature branches, but in the most
> cases submit_branch is the same as parent_branch.
The parent branch is the location we pull from, but not necessarily the
location we want to submit to.
The motivating case was: a developer uses two different machines, "work"
and "home" to work on a feature branch. When the developer starts using
"home", having previously used "work", she pulls. This uses the parent
branch to retrieve the latest changes from "work". Periodically, the
developer merges from "trunk", so that her branch will not have big
conflicts when she finally submits her work. Finally, she submits her work.
> Therefore it's should
> be enough to use just parent_branch.
I disagree. I think the above case is one we should support. It was my
experience of developing bzr before I started working from home.
> The problem here is that submit_branch only set by merge, but used by
> send command (and in the explorer). And this is confusing a bit.
I considered storing a separate merge location, but we already had
separate parent, pull, push and submit locations, so I hoped that would
be enough. I think I was wrong, and we should have a separate merge
location. If merge did not set the submit location, that would
eliminate your main gripe, right?
> If
> merge remember the last location where from it merged first(last) time
> why such location is not named as merge_branch or merge_from_branch?
I initially conceived it as a location to submit to. Later, I thought
it would be a good idea to merge from the submit location by default.
Later still, I thought it would be a good idea to remember the
last-merged location if unset.
> I don't use send command for my work, just because LP merge proposals
> are awesome.
Thanks!
> So submit_branch for me is not needed as a way to provide a
> hint for send.
Only if you want to submit to the trunk branch. If you want to submit
to a different branch, it can be useful.
> To fix that I have to manually edit branch.conf and set submit_branch to
> nothing, exactly like that
>
> submit_branch =
>
> But do that for every new branch is boring and I constantly forgot about
> that.
You should be able to set it just once in locations.conf.
> So, as a matter of backward compatibility I don't think submit_branch
> can be removed at all. But I can't prevent merge to store the location
> to branch.conf even if I use --no-remember command-line option, although
> bzr never complains about that option. It just ignores it and does what
> it does.
Right, that's what it's supposed to do. It means "ignore any --remember
options I may have set previously, and use the default behaviour".
> So, what could be better way to workaround that? Teach merge to properly
> handle --no-remember or have global option in bazaar.conf to do the same
> but from inside bzrlib? Or just give up/take it easy and only
> concentrate on what I want from explorer?
The best thing is to create a new location, merge_location, and have
"bzr merge" use and set that. That way, submit location will not be set
to the wrong value.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk3MM/sACgkQ0F+nu1YWqI0KBgCdFKWwTifWB4zXRHKpzApltluc
wVYAn16oXIJAXE20Xc9XzPXeMGN4SVT0
=9wxT
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list