[RFC] bzr.jrydberg.versionedfile

Johan Rydberg jrydberg at gnu.org
Wed Dec 21 15:23:51 GMT 2005


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.

> 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.

~j





More information about the bazaar mailing list