[MERGE] Pass create_prefix paremeter to BzrDir.push_branch.
Jelmer Vernooij
jelmer at samba.org
Thu Jun 11 22:42:48 BST 2009
On Thu, Jun 11, 2009 at 03:19:10AM -0400, Ian Clatworthy wrote:
> I'm not sure about this, despite it being a rather innocent change.
> My main concern is that it confuses the layering, i.e. which layer has
> responsibility for creating the prefix. Right now, it's push.py. If we
> add a parameter to the method in bzrdir.py, then arguably the logic
> ought to be moved there rather than be left in push.py? Otherwise,
> there's a parameter there in the bzrdir.py method that we're ignoring
> with no obvious reason as to why.
Unfortunately this is a bit of a mismatch between Bazaar and
Subversion, since Subversion only has the concept of versioned directories,
whereas Bazaar has "regular" directories, control directories and
branches.
> Maybe there's another way? I'm thinking of a flag saying whether control
> dirs are virtual for a given transport, and using that in push.py to
> decide whether to push down create_prefix or not. I can't say that
> that's necessarily better but I wanted to check that you had ruled it
> out.
That is certainly a possibility, but it would in the end result in the
same situation; we'd specify create_prefix as argument only once,
where it's actually necessary rather than always.
We could add a InterBzrDirTransport class that would have a push() method that
could take care of this sort of thing and replace the call to
Branch.create_clone_on_transport(). That would be the cleanest solution,
although it would also be quite a bit more complex.
Cheers,
Jelmer
More information about the bazaar
mailing list