[RFC] I want to disable submit_branch on my computer for all branches. How can I do that?

Alexander Belchenko bialix at ukr.net
Sat May 14 15:22:52 UTC 2011


12.05.2011 22:24, Aaron Bentley пишет:
> 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.

Sometimes I do the same, but it's never a problem to me: sync my
feature branch from LP or my USB stick and continue working on my
code. The only one part is missing: I don't submit my work.
Either I push to lp and create merge proposal, or I merge to trunk of
my job, using human gatekeeper workflow. But "that's just me".

>> 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.

OK, your explanation is helpful, thanks. I did not imply that
everybody works the same way as I do, hence the subject of my mail:
"I want to disable submit_branch on *my* computer" :-)

>> 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?

Separate merge_location will eliminate my problems in bzr-explorer,
but still won't help me to not remember it.

>> 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.

OK, I see. Obviously my workflow is different.

>> 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.

I never thought about it. I just need to set it for entire filesystem,
don't I? Actually I don't use locations.conf at all.

>> 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".

OK, I was wrong then. I didn't think about scripting features, like
bzr merge --remember --no-remember

You proposal of using

--remember
--maybe-remember
--dont-remember

sounds very useful, because it supports all possible workflows.

In either case, teaching --no-remember do what I thought or
implementing your proposal will break --no-remember.
As I understand you, it's better for us to have explicit registry with
3 choices.

Vincent, sorry, I haven't time to read all this big thread before I
voted on your proposal. Do you think 3 options above will be better
for all?

>> 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.

And then for people like you, how to set submit_location? With bzr
config? Right?



More information about the bazaar mailing list