[MERGE] Replace VersionedFile.get_parents with get_parent_map

Robert Collins robertc at robertcollins.net
Thu Mar 20 23:32:14 GMT 2008


On Thu, 2008-03-20 at 10:47 -0500, John Arbash Meinel wrote:


> Your change to iter_reverse_revision_history doesn't handle if a mainline parent
> is a ghost:

I thought we truncated at that point normally? I can change it to work,
but is it desirable ?

> This seems wrong:
> @@ -758,8 +768,11 @@
> ~         version_ids = set(other.versions()).intersection(set(version_ids))
> ~         # pull in the referenced graph.
> ~         version_ids = other.get_ancestry(version_ids)
> - -        pending_graph = [(version, other.get_parents(version)) for
> - -                         version in version_ids]
> +        pending_parents = other.get_parent_map(version_ids)
> +        pending_graph = pending_parents.items()
> +        if len(pending_graph) != len(version_ids):
> +            raise RevisionNotPresent(
> +                set(version_ids) - pending_parents.keys(), self)
> 
> When I try it:
> 
> |>> set([1, 2,3]) - [2, 3]
> TypeError: unsupported operand type(s) for -: 'set' and 'list'
> 
> Which may indicate we have a missing test.

Ah yes, looks like we do. I'll fix the thing.

> Otherwise:
> 
> BB:tweak

Thanks, I'll hold off until the iter_reverse stuff is clarified.

-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/20080321/caad7d82/attachment.pgp 


More information about the bazaar mailing list