[RFC] Begin fixing bug #233817: missing doesn't show merged revisions
John Arbash Meinel
john at arbash-meinel.com
Wed Sep 3 20:22:08 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vincent Ladeuil wrote:
> This partially address bug #233817 but I'd like some early
> feedback before finishing.
>
> The comments associated to the bug are all very pertinent, yet, I
> chose to address the bug itself directly before trying to
> refactor all log related commands :D
>
> I chose to add a '--include-merges' option because:
>
> - that's exactly what the bug reporter asked for,
>
> - a variable was named liked that for this precise purpose in log.py
>
> and this sounded like a nice convergence.
>
> Since this a code area I'm not familiar with, I'd like feedback
> mainly on the 'make it right' part.
>
> I tried to respect what have been done log.py regarding the 'make
> it fast' part, but I may have failed.
>
> Finally, the merged revisions are not indented in this version, I
> know that.
>
> Thanks in advance,
>
> Vincent
>
So the primary issue is that (as of yet) we can't do dotted revno numbering
without accessing the full revision graph. And your work here:
+ parent_map = graph.get_parent_map(ancestry)
+ # filter out ghosts; merge_sort errors on ghosts.
+ # XXX: is this needed here ? -- vila080903
+ rev_graph = _mod_repository._strip_NULL_ghosts(parent_map)
+ # XXX: what if rev_graph is empty now ?
+ merge_sorted_revisions = tsort.merge_sort(rev_graph, tip,
+ None, generate_revno=True)
^- Will give wrong numbers for anything resembling complex history. I can give
specific graphs that it will break, or you can just trust me. :)
I mentioned on IRC:
http://bzr.arbash-meinel.com/branches/bzr/1.6-dev/lazy_revno/
Which is my work to create a LazyRevnoMapper class, which can computed dotted
revnos without accessing the full ancestry. It does a lot of work to figure
out the maximal set of all nodes that could influence a given revno, and then
computes the revnos it needs.
I think it will be beneficial some day, and as you finally have new code that
could benefit from it (rather than 'bzr log' which would need a rather
dramatic overhaul to use it effectively) maybe you would like to either take
up the effort, or encourage me to do so ?
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIvuPgJdeBCYSNAAMRAqv7AKCskwatii9tfWYvZOmnjDMe4z2pUQCfUKMI
Pje6iadJInUAJEX/7AenVNc=
=YMtA
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list