[RFC] bzr.jrydberg.versionedfile

Robert Collins robertc at robertcollins.net
Fri Dec 23 07:20:13 GMT 2005


On Wed, 2005-12-21 at 16:23 +0100, Johan Rydberg wrote:
> John Arbash Meinel <john at arbash-meinel.com> writes:
> 
> >> Versioned files are owned by the store that they are located in, and
> >> only the store should add files to the identity map.  Also, there may
> >> be several stores using the same map, so using "weave-" + file_id as
> >> key just don't cut it.  
> >
> > What stores are sharing the identity map? Isn't there 1 map per branch?
> > So even if you have revision-store and text-store sharing the map, they
> > don't have overlapping ids.
> 
> I can imagine that we might have some freaky stores in the future.
> Better to be prepared than have to rewrite things later.
> 
> But the fundamental reason I want the API to be generic is that the
> identity map is just that; a generic way to cache information
> throughout the lifetime of a transaction.  If you want to protect
> yourself against collisions; use a more specific key.  In the case of
> versioned files, only the store should know about the cached entries,
> so it puts itself in the key.

Sure, I'm not arguing about the key algorithm. I'm arguing against early
generalisation. I think making it generic right now will prevent us
seeing the real patterns that a set of explicit calls would show, and
that that makes it less useful as a result. 

> > So the next word to turn to (for me) is 'text'. And I think 'lines'
> > conveys the idea of a sequence of lines quite well.
> 
> When you look at a paper, do you think of the text on it as a set of
> lines, or as a stream of characters/words?  
> 
> This is really a no-issue; but I like esthetics.  I can rewrite the
> code tens times if it doesn't look good. (and sometimes I just don't
> care for some reason.)  But open source is also about compromise.
> 
> I'm +1 for *_text.

I'm -1 for foo_text that is not a string.

I'm completely happy to have foo_lines() the default api, and infact for
there to be no foo_text(), but I think foo_text() -> list of lines is
just far too confusing.

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/20051223/dc7e21ac/attachment.pgp 


More information about the bazaar mailing list