[RFC] browsing history API

Martin Pool mbp at canonical.com
Tue May 23 06:01:44 BST 2006


On 23 May 2006, Robert Collins <robertc at robertcollins.net> wrote:
> 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.

Actually I'm glad to hear you say that because I had been wondering the
same thing myself.  So we'll want things that look like

    repo.some_file_history_query(file_id, ...)

rather than 

    repo.get_versioned_file(file_id).some_query()

In some ways the second seems better factored but only if you assume
that all repositories will have objects representing the history of a
particular file, which is not true.

-- 
Martin Pool




More information about the bazaar mailing list