Comment 7 for bug 185298

Revision history for this message
Vincent Ladeuil (vila) wrote : Re: [Bug 185298] Re: `bzr whoami --tree joe@example.com`

>>>>> Alexander Belchenko <email address hidden> writes:

    > Thinking today about this more I've realized that both --branch and
    > --tree are not very helpful names and they required from user to
    > understand is he/she has branch+tree locally or lightweight checkout
    > only. Therefore we may have endless source for confusion and questions
    > from new users. Maybe something like --local would be better, and it
    > will automatically save id info in the branch.conf or (imaginary)
    > tree.conf. Going further we might need --master option too, to imitate
    > current --branch behavior for light checkout. (I can imagine very rare
    > case when user want to have one master branch and zillion light
    > checkouts on zillion computers and want to have a single id settings
    > among those). Such --master option will behave in the same manner as
    > --local for regular branch/tree.

    > So what I said above maybe just bikesheding,

No it isn't, these are fully valid use cases that we don't cover yet.

    > and we just need implement tree.conf first. And only then thinking
    > about this issue.

I did.

That's why 'bzr config' got a --scope parameter which can be used to
force the setting of the option in any config file you want and will
also get (in the future) a --section parameter to more precisely set an
option inside a given file.

Then, we can define a policy regarding where the 'email' config option
can be set and the problem will finally be fully solved.

In this specific case, I think the policy will be that it can be set in
any config file (the default policy), knowing that they will be
consulted in the following order:

- locations.conf
- tree.conf
- branch.conf (master branch.conf ? Still unclear)
- bazaar.conf
- bzrlib for a default value

The default value will be None in this case.

We can then also get rid of whoami or just make it an alias to 'bzr
config'.

Search for configuration.txt in lp:~bzr-core/bzr/devnotes for a complete
disclosure of my evil secret plan ;)

    Vincent