Should determine_repository_policy really be on BzrDir?
mbp at canonical.com
Fri Mar 6 07:04:21 GMT 2009
I'm just debugging some failures we get in changing the default format
to be 1.9 (allowing stacking) and am finding the interaction of
repository policies and remote bzrdirs a bit strange. (Specifically
failing for me.)
If you look at BzrDir.clone_on_transport you'll see it needs to
actually first create a remote bzrdir, then think about whether it
needs to support stacking, and if it it does then it goes back and
does a kind of ad-hoc upgrade.
It seems to me that if the policy is meant to control creation of the
on-disk objects then you ought to determine the policy before you
start writing anything out, and there's no in principle reason why you
shouldn't be able to do so. At the moment that code lives on a
BzrDir, but it should probably instead be on a BzrDirFormat, and you
could just give it the transport that it should use to look at the
location or to work out what url applies.
I haven't changed this yet but I'll probably try it now...
More information about the bazaar