push and svn/hpss/vfs

Robert Collins robert.collins at canonical.com
Thu Apr 16 04:50:47 BST 2009


Hi Jelmer, I'm working on reducing round trips in push.

I want to check I understand bzr-svn's needs correctly. AIUI you need to
never 'just make' a branch, rather you need to *either* push to an
existing branch, or 'push a new branch'.

I want to reduce the churn on objects by creating a branch object
remotely and holding onto the object thereafter rather than reopening
lots.

I want to have a helper function which does not take anything that we
can't pass to a remote function, so that it can do  (psuedo code):

if transport-is-a-smart-server-transport:
    return transport.get_smart_client._call('give me a branch', *args)
else:
    return give_me_a_branch_helper(transport, *args)

But it seems like that will conflict with your needs, as you can only
support open-or-fail, not open-or-create.

So I'm wondering if this function were to return a tuple:
(bzrdir, branch)

Then, the show_push code would do:
to_dir, to_branch = get_a_branch(....)
if to_branch is None:
    to_dir.push_branch(....) #btw, confusingly named
else:
    source.push(to_branch)

The way I'm thinking this would work for svn is that the helper would
always return None for to_branch on svn transports.

Or we could reevaluate InterBranch.push()

I appreciate that svn must work off the control dir, but for bzr that is
bad because it requires extra round trips.

Thoughts?

-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090416/95193604/attachment.pgp 


More information about the bazaar mailing list