Difference in file_graph.heads() and rev_graph.heads()

John Arbash Meinel john at arbash-meinel.com
Mon Nov 30 23:14:16 GMT 2009


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

I was working on some improvements for fast-import, and ended up coming
across an unexpected case. Namely the per-file graph gives a different
result that the whole-tree graph. Put in terms of code:

 r1 = revision_id1
 r2 = revision_id2
 f = file_id

 repo.get_graph().heads([r1, r2]) == r1
 Graph(repo.texts).heads([(f, r1), (f, r2)]) == [(f, r1), (f, r2)]

The per-file graph says that both revs are heads, but the whole-tree
graph says that one revision dominates.

And if you take "repo.get_graph().iter_ancestry([r1])" it does contain r2.

The per-file graph looks like:

(f, r1): [(f, r3)]
(f, r2): [(f, r3)]
(f, r3): []


Now it is possible that this is a conversion issue, but this is with an
updated fast-import that uses CommitBuilder.

It is a bit difficult to figure out what is going on, because in the
revision graph, these revisions are about 1500 commits apart.

I think at this point, I need to track down when the revision was merged.

It is also possible that the file was deleted before the merge (and
restored by the merge). Which *doesn't* converge the per-file graph (I
believe.)...

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

iEYEARECAAYFAksUUcgACgkQJdeBCYSNAAPHbQCgvr4/iZYEc2hSSU4tWzPpH17A
4f0An0VRvEyGQMZLv/Cr2LZyxuuYsHWK
=kiIe
-----END PGP SIGNATURE-----



More information about the bazaar mailing list