[MERGE] branch.has_explicit_nick

Aaron Bentley aaron.bentley at utoronto.ca
Fri Jun 30 15:58:05 BST 2006

Hash: SHA1

Robert Collins wrote:

>>My initial reaction is that I want my explicit nicks to behave the same
>>as my implicit nicks.  Could you say more?
> Well they clearly dont: rename a dir with an explicit nickname, and the
> nick does not change.

If you set the explicit nick in locations.conf, it will :-P

>>The recent puts BranchConfig in charge of policy for determining config
>>options.  For example, BranchConfig knows that it should try to read
>>.bzr/branch/email to determine the per-branch email address.  And it
>>also knows that 'post_commit' should never be determined from a TreeConfig.
> Sure, I think my later patch took this into consideration. 

The second one (which I was replying to) took it into more
consideration, but it took some of the policy knowledge (i.e. where to
get a nick if there's no explicit nick) out of BranchConfig, and put it
in Branch.

> FWIW I find
> having both TreeConfig and Branch config confusing, and TreeConfig is
> for Branches and BranchConfig is for branches.

I agree, and I'd be happy to rename them.  Here's how I see the
relationship of our various config classes:

Policy-based-configuration object: BranchConfig
  Maintins no (or very little) data on its own, but gets and sets data
  in other, more specific objects.

Branch contents-based configuration object: TreeConfig
  Ini-based config that gets and sets data in the branch directory,

Location-associated configuation object: LocationConfig
  Ini-based config that gets and sets data in local configuration files.
  Can also store data for locations that are not branches.

Global configuration object: GlobalConfig
  Ini-based config that gets and sets data in local configuration files.
  Not associated with any particular branches.

> I'm find with that too, though I think that the BranchConfig decision
> about the *default* nickname is best delegated to the Branch, not to the
> Config class, which is why I did the changes to Branch.

I thought it made sense to stick all the policy logic in one place,
which is why I moved it out of Branch.

Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org


More information about the bazaar mailing list