[RFC] browsing history API

Robert Collins robertc at robertcollins.net
Tue May 23 01:31:59 BST 2006


On Thu, 2006-05-18 at 19:20 +1000, Martin Pool wrote:
> 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 that the API for determining when the file was altered should be
on repository, not on the per-file versioned file. That is, calling
straight into the versioned file is an abstraction violation.

This is important IMO because if we do manage to make calculating this
with renames correctly it should be corrected in the api that generates
the list, not in log per se.

-1 on this being on VersionedFile, and -1 on the
get_full_revision_history_by_fileid being on branch - most of the calls
in the function are on repository, so this entire api should be on
repository.

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: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060523/50dd04ef/attachment.pgp 


More information about the bazaar mailing list