[MERGE] Add Branch.set_last_revision_ex HPSS verb to accelerate push

Andrew Bennetts andrew at canonical.com
Thu Jun 19 03:59:36 BST 2008


This patch adds a new verb to the smart server for updating the last revision of
a branch.  It has the rather uninspired name of “Branch.set_last_revision_ex”.
Suggestions for a better name are welcome ;)

This verb has a couple of flags that make it more useful than the existing
set_last_revision_info verb.  It allows the client to ask the server to check if
the new tip has diverged from the old tip, and also to tell the server whether
or not to update the tip if the new tip is actually an ancestor rather than a
descendant.  This makes Branch.update_revisions much simpler for RemoteBranch,
and in particular allows the client to completely delegate a lot of graph
walking to the server.

The new verb also returns the resulting revno, revision_id pair so the client
doesn't have to calculate the revno itself (after all, the remote side must have
already figured out the revno in order to do branch.set_last_revision_info()).

The result is a modest improvement in push performance.

The tests for the server-side are a bit messy and incomplete, and have an
annoying amount of duplication with some existing verbs.  I'm working on that :)

This patch is based off the “Add Remote-v2 variant ...” patch I submitted
yesterday.  It doesn't strictly depend on it, although the test coverage is
better with it.

Reviews, comments, and benchmarking welcome :)

-Andrew.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: set_last_revision_ex.patch
Type: text/x-diff
Size: 57897 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080619/dc06f888/attachment-0001.bin 


More information about the bazaar mailing list