`bzr whoami --tree <email address hidden>`

Bug #185298 reported by Alexander Belchenko
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Medium
Unassigned

Bug Description

'bzr whoami --branch' sets the user identity for a branch.

It would also (or instead?) also be useful to have a --tree option that sets the user identity for a working tree. Because the main purpose of whoami information is to provide user identity for commit, and commit requires a tree.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 185298] `bzr whoami --branch joe@example.xom` and lightweight checkout

 status confirmed

Changed in bzr:
status: New → Confirmed
Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 185298] `bzr whoami --branch joe@example.xom` and lightweight checkout

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
> I think command `bzr whoami --branch xxx` should not change identity of
> original branch on the server but store this info locally for this and
> only for this checkout. Otherwise it's pollute to all lightweight
> checkouts of this branch.

A lightweight checkout's only branch is the original branch on the
server. When do whoami --branch, you're asking to change that branch.
If you wanted to change only the checkout, you should not ask to change
the branch.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHmQHh0F+nu1YWqI0RAoufAJ4uixIUNTeAlhdYXuIhi4iPZTSCdQCdHmLV
tVxRG+ZWnaQmHi6P1zNj+fU=
=/1Ja
-----END PGP SIGNATURE-----

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 185298] `bzr whoami --branch joe@example.xom` and lightweight checkout

On Thu, 2008-01-24 at 21:23 +0000, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Alexander Belchenko wrote:
> > I think command `bzr whoami --branch xxx` should not change identity of
> > original branch on the server but store this info locally for this and
> > only for this checkout. Otherwise it's pollute to all lightweight
> > checkouts of this branch.
>
> A lightweight checkout's only branch is the original branch on the
> server. When do whoami --branch, you're asking to change that branch.
> If you wanted to change only the checkout, you should not ask to change
> the branch.
>

I don't think that it is possible to change the checkout is it? I also
think that whoami --branch should change the checkout not the branch
in this case. However, regardless of that it should be possible to
change the checkout.

Thanks,

James

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 185298] `bzr whoami --branch joe@example.xom` and lightweight checkout

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

James Westby wrote:
> I don't think that it is possible to change the checkout is it?

Not at present, but it wouldn't be hard to implement.

> I also
> think that whoami --branch should change the checkout not the branch
> in this case.

checkout != branch.

I can see how you would want a whoami --tree instead of whoami --branch.

But since the option is --branch, it should affect branches. I would
consider it a bug if it didn't.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHnOpb0F+nu1YWqI0RAn1NAJ902+RIoX1okzNNmko3P3a9fu4GZQCfSXMc
AFPXVP0Wj3+drcA/ZVdGdTI=
=0QsU
-----END PGP SIGNATURE-----

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 185298] `bzr whoami --branch joe@example.xom` and lightweight checkout

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aaron Bentley пишет:
| James Westby wrote:
|> I don't think that it is possible to change the checkout is it?
|
| Not at present, but it wouldn't be hard to implement.
|
|> I also
|> think that whoami --branch should change the checkout not the branch
|> in this case.
|
| checkout != branch.
|
| I can see how you would want a whoami --tree instead of whoami --branch.
|
| But since the option is --branch, it should affect branches. I would
| consider it a bug if it didn't.

I don't see any reason why whoami command should be targeted for branch
and not for checkout. whoami information used during commit and commit
did not work without checkout.

So for me `bzr whoami --branch` is incorrect and useless.

I tend to agree about this bug report as incorrect. Because more correct
bug report should claim about --branch flag.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHnW7ezYr338mxwCURAv8FAJ9HZ+l7X1AxQpRRygc4eV7QwCt3rgCfYMOq
b85q1Cw44u4gn9BREZaLJCY=
=8WWg
-----END PGP SIGNATURE-----

Jelmer Vernooij (jelmer)
summary: - `bzr whoami --branch joe@example.com` and lightweight checkout
+ `bzr whoami --tree joe@example.com`
description: updated
tags: added: whoami
Vincent Ladeuil (vila)
tags: added: config
Changed in bzr:
importance: Undecided → Medium
description: updated
Revision history for this message
Alexander Belchenko (bialix) wrote :

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, and we just need implement tree.conf first. And only then thinking about this issue.

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

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
tags: added: easy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.