[MERGE] Factor out the Graph.heads() cache from _RevisionTextVersionCache for reuse, and use it in commit.

Robert Collins robertc at robertcollins.net
Thu Oct 18 03:57:35 BST 2007


On Wed, 2007-10-17 at 21:51 -0500, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Robert Collins wrote:
> ...
> 
> > 
> > Some code modifies the return value deliberately.
> > 
> > -Rob
> > 
> 
> I would argue that you let them create their own sets. Rather than forcibly
> creating a new object every time you enter this function.
> 
> If *all* callers need to modify the set, then fine. But I doubt that is the case.
> 
> Maybe it is an API break... but probably a rather minor one at that.

Well the cache is new, but it seems like a good idea to me to have its
api match that of the function it wraps, so that the cache can be
inserted and removed seamlessly.

-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/20071018/4a048697/attachment.pgp 


More information about the bazaar mailing list