[RFC] browsing history API

Martin Pool mbp at canonical.com
Thu May 18 10:20:57 BST 2006

On 17 May 2006, Goffredo Baroncelli <kreijack at alice.it> wrote:
> Hi all,
> for my project ( a bazaar web interface[*] ) I need to browse the full 
> history[**] both on the branch basis and on the file_id basis ( of a specific 
> branch of course).

> For the second case ( an history on the file_id basis ), the 
> bzrlib.log._show_log( ) function perform for every revision a 
> branch.get_revision_delta(revno) and check for the presence of the file_id 
> involved.
> In my opinion that is too expensive, and I'd propose a new API which 
> calculates the revision history on the basis of weave or knit index , 
> depending on whichever you use.

I agree that it's too expensive.

As Johan says, you can already get an index from a VersionedFile.  The
change to log to call this looks good; you should make sure there is a
test that exercises this if there is not already one.

I think this may cause one change in log's behaviour: at the moment "bzr
log foo" will report revisions that renamed foo, and this change
probably will not, because the contents of foo itself will change and no
new version is recorded.  

Perhaps that is a reasonable tradeoff to be able to do it so much more
quickly, but we could think about what should be done in the future.


More information about the bazaar mailing list