Comment 1 for bug 495502

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 495502] [NEW] Expose get_known_graph_ancestry() on Repository API

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jelmer Vernooij wrote:
> Public bug reported:
>
> affects bzr
> status confirmed
> importance low
>
> Not all repository implementations provide VersionedFiles. It would be
> nice if get_known_graph_ancestry() was exposed as part of the Repository
> API so that it can be used for these repository formats.
>
> ** Affects: bzr
> Importance: Low
> Status: Confirmed
>

You *can* always do:

from bzrlib import graph as _mod_graph

kg = _mod_graph.KnownGraph(dict(repo.get_graph().iter_ancestry([??])))

(You may need to filter out ghosts, which will be repopulated in kg, I'm
not positive.)

It is, essentially, how I would implement Repo.get_known_graph_ancestry().

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksiXl4ACgkQJdeBCYSNAAPLvgCfULz8im/TBEc/PyiPLKFWYoEi
bnYAoK7nv/RNC6xU3W7sd7OFbyUHVl+j
=jBpX
-----END PGP SIGNATURE-----