[MERGE] Support fetching a restricted set of revisions

Robert Collins robertc at robertcollins.net
Sun Jul 15 05:15:08 BST 2007


On Sat, 2007-07-14 at 12:20 -0400, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Jelmer Vernooij wrote:
> > The attached bundle adds a parameter to InterRepository.fetch() to
> > retrieve a limited set of revisions from the source repository and adds
> > an implementation for retrieving a limited set to KnitRepository1. This
> > is a step towards shallow branches.
> 
> Wouldn't it be more efficient (e.g. with the smart server) to specify
> the history horizon revision, rather than the particular revisions to fetch?

Only by one round trip. e.g.

revs = source_repository.select_breadth_first_revisions(branch_tip, 10)
 -> RemoteSet(opaque data from the server - probably a hundred bytes or
less)
target.fetch(..., limit_revisions=revs)

should work just fine: if revs gets iterated locally, we make a call and
realise its value, if it doesn't (because its streaming from the server)
then we never send the entire list over the wire. And allowing a set or
iterable of revisions is more flexible - so if the cost is one round
trip; I think thats ok.

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070715/8de2f72b/attachment.pgp 


More information about the bazaar mailing list