[MERGE] Repository.missing_revision_ids -> search_missing_revision_ids
Robert Collins
robertc at robertcollins.net
Thu Jan 17 21:21:47 GMT 2008
On Thu, 2008-01-17 at 13:52 -0600, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Robert Collins wrote:
> > This replaces the missing_revision_ids API with
> > search_missing_revision_ids.
> >
> > There are two key differences:
> > - the new api returns a SearchResult
> > - SearchResults do not offer topological ordering results at the moment
> >
> > This is a stepping stone to reducing initial-branch network traffic.
> >
> > -Rob
> >
>
>
> > @needs_read_lock
> > + def search_missing_revision_ids(self, other, revision_id=None, find_ghosts=True):
> > + """Return the revision ids that other has that this does not.
> > +
> > + These are returned in topological order.
> > +
> > + revision_id: only return revision ids included by revision_id.
> > + """
>
> ^- You just said that they are not in topological order, so the
> docstring should be updated to reflect that.
Bleh missed one :).
> Is it possible to implement a compatibility
> "search_missing_revision_ids" which is implemented in terms of
> "missing_revision_ids"? I'm thinking for plugins like bzr-git/bzr-svn
> which may not have implemented the new API yet, it is nice to have them
> still work.
>
> Unless it is expected that the generic "search_missing_revision_ids"
> would work for all other implementations. It looks like you might be
> doing it as a series of set operations, which seems like it would work
> for all repositories.
There is a search_missing_revision_ids on the root InterRepository; it
will work for repositories that implement the graph functionality for
repository so this is already present. It may mean that an optimised
missing_revision_ids call stops being invoked; but it will trigger a
test suite failure because their old one won't be deprecated.
> > + for parents in repository.get_graph().get_parent_map(
> > + result_set).itervalues():
> > + result_parents.update(parents)
>
> ^- This would be one of those cases where we wouldn't want
> "get_parent_map()" to return more items than requested. Obviously if we
> changed the api, this could be rewritten to filter at this point.
Sure; I wrote this post the discussion about that :).
Seems like this is good to merge once the lower level patch is oked :).
-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: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080118/e17b27b4/attachment.pgp
More information about the bazaar
mailing list