risc or cisc

Robert Collins robert.collins at canonical.com
Wed Apr 15 09:22:23 BST 2009


So,
    the network is now getting past the low hanging fruit phase:
This is current (once my latest patch lands in bzr.dev)
Pushing a new branch:

[BzrDir.open, mkdir, mkdir, BzrDirFormat.initialize, BzrDir.open,
BzrDir.find_repositoryV3, BzrDir.create_repository,
Repository.set_make_working_trees, Repository.lock_write,
Repository.has_revision, Repository.get_parent_map,
Repository.get_parent_map, Repository.insert_stream,
Repository.insert_stream, Repository.get_parent_map,
Repository.insert_stream, BzrDir.create_branch, Branch.lock_write,
Branch.set_config_option, Branch.set_last_revision_info,
Branch.set_parent_location, Branch.unlock, Branch.get_stacked_on_url]

These can be grouped:
'making the new object
[BzrDir.open, mkdir, mkdir, BzrDirFormat.initialize, BzrDir.open,
BzrDir.find_repositoryV3, BzrDir.create_repository,
Repository.set_make_working_trees, 

'push new content
Repository.lock_write, Repository.has_revision,
Repository.get_parent_map, Repository.get_parent_map,
Repository.insert_stream, Repository.insert_stream,
Repository.get_parent_map, Repository.insert_stream,

'make new branch which is stacked
BzrDir.create_branch, Branch.lock_write, Branch.set_config_option,
Branch.set_last_revision_info, Branch.set_parent_location,
Branch.unlock,

' show the new branch
Branch.get_stacked_on_url

Now, what we need is an internal API which matches the network round
trips we want to take place.

I'm wondering whether it makes sense to just have very long parameter
lists - e.g. 'make or open a branch at transport t, stacked if needed,
of format Y, allowing shared, ...', (e.g. adding very high level
operations), or to look at having a mini language that can operate on
the server (e.g. if it was python: 
def acquire_branch():
   try:
       b = branch.open(t)
   except NoBranch:
       b = create_branch(t)
       b.set_stacking()
   return b
b = target.run_script(acquire_branch)
)

I think a mini language is definitely more complex *today* but we're
adding more and more methods - and the complexity of creating good
abstractions is getting higher and higher.

-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/20090415/53cbfd8e/attachment.pgp 


More information about the bazaar mailing list