[RFC] browsing history API
John A Meinel
john at arbash-meinel.com
Tue May 23 14:48:02 BST 2006
Johan Rydberg wrote:
> Martin Pool <mbp at canonical.com> writes:
>
>> I think you will want the entire graph of the file leading up to the
>> version present in a particular tree. Although there may be other
>> irrelevant versions of that file that haven't been merged, all the ones
>> that have been merged in are by definition relevant. You can do this
>> just by looking at the file's graph.
>>
>> (Or if not, maybe you can explain more about what you want to get out.)
>
> What I want to get out is a (ordered) list of all revisions that
> changes a file, that has been merged into a branch.
How do you want them ordered? breadth-first, depth-first, date-wise?
(Because of clock skew, it is possible that a revision will be merged
before it is created. Though fairly unlikely).
Doesn't this do what you want:
rev_id = branch.last_revision()
vf_store = branch.repository.text_store
vf = vf_store.get_weave(file_id)
ancestry = vf.get_graph([rev_id])
And then if you need to, you can probably 'topo_sort' the ancestry graph.
I don't know if this is the api that we want, but it is using all public
apis.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060523/045efdf3/attachment.pgp
More information about the bazaar
mailing list