[MERGE] key-length GraphIndex adapter

Robert Collins robertc at robertcollins.net
Wed Aug 8 23:13:11 BST 2007


On Wed, 2007-08-08 at 16:58 -0400, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Robert Collins wrote:
> > I've incorporated John's review feedback on this.
> 
> This does not appear to be the correct patch.  It does not provide a
> GraphIndexPrefixAdapter.  Instead, it is apparently concerned with
> renaming "node" to "key" in various APIs, providing ways of obtaining a
> key count, and adding a Dindex flag.

I had two patches up, this, and the knits _PackAccess patch. The
_PackAccess patch included most, but not all of this patch - and John
reviewed the entire set.

> Also, GraphIndexPrefixAdapter is not a very intuitive name.  Perhaps
> something relating to "subset" or "filter"?  PrefixFilteredIndexAdapter?
> "prefix" to me does not connote subsetting.  A GraphIndexPrefixAdapter
> might *add* a uniform prefix to keys, for example.

It does add a uniform prefix to keys - when you query for ('foo', ) it
asks for PREFIX + ('foo',), and when it reads the result it strips
PREFIX.

I'd like the name to:
 - indicate that it implements the GraphIndex protocol (its not a plain
Index - it is Graph aware)
 - indicate that its not an index on its own, rather an adapter to tweak
the behaviour of another index

I'm happy to add Filtering or Filtered to the name...
GraphIndexPrefixFilteringAdapter ?

>   That might actually
> be sensible, if you were trying to make knit/weave repos provide an
> interface similar to pack-based repos.

The adapter is used to provide a knit interface to pack based repos, so
it is exactly that, though the other way around from what you
suggest :).

-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/20070809/0478c629/attachment.pgp 


More information about the bazaar mailing list