[merge] avoid RemoteLockableFiles special handling of branch.conf (and query: purpose of Branch.get_config_file rpc)

Martin Pool mbp at canonical.com
Wed May 7 01:03:14 BST 2008


On Wed, May 7, 2008 at 9:41 AM, Robert Collins
<robertc at robertcollins.net> wrote:
> On Tue, 2008-05-06 at 22:37 +1000, Martin Pool wrote:
>  > In the future if we want to disable vfs methods we would need a way to
>  > get a branch's configuration.  I think that should be explicitly
>  > handled at the Branch level: either giving it a
>  > get_branch_conf_bytes() method (which locally just reads the file), or
>  > perhaps inverting control and giving it a method to give you back a
>  > Config object.
>
>  Uhm. I think you may have misunderstood the goal here. The point was to
>  allow the remote server to *control* the configuration. The remote
>  method called is a Branch verb; it can't return an object over the wire,
>  so it is returning something which the rest of the code will correctly
>  interpret.
>
>  e.g. this is meant to be explictly at the Branch level.

I agree with that.

The problem is a kind of abstraction inversion.  There is an abstract
method on the wire (give me the configuration) but it's called by a
more concrete action on the RemoteBranch (read branch.conf).  When it
makes sense to have this be abstracted out, the way the configuration
is constructed from the Branch should reflect that.

However, this code is not active at the moment, so it's clearer and
makes the later change easier to just remove it.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list