[PATCH 4 of 4] graphlog: support >2 parents in nodegrapher()

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Sat Nov 8 02:31:25 CST 2008

On Fri, Nov 7, 2008 at 10:12 PM, Oliver X <oxymoron at waste.org> wrote:
> On Fri, 2008-11-07 at 09:21 -0700, Bill Barry wrote:
>> Does this mean that there will be the possibility to do something like
>> the octopus merges in GIT?

No. graphlog.py contains a fairly general function to visualize a DAG
using ASCII art. I already refactored graphlog.py to expose this
function directly, without it being tied to hg csets. Now I can use
the same function to visualize other DAGs. In particular, I want to
visualize the patch dependencies in my new pbranch extension.

But the function is still limited to <=2 parents, which was OK when it
was only used to visualize csets. For my patch graphs, I need support
for >2 parents.

> Octopus merges are a bad idea: there's no well-defined n-way merge
> operator aside from 'do a bunch of three way merges and forget what
> order you did them in'. So we don't do that. We also store the revision
> graph in an index which has small fixed-sized entries, so there's not
> space for more than two parents anyway.

Correct. (Incindentally, pbranch internally needs something like
octopus merges and simulates them by repeated 2-parent merges. But
that does _not_ mean hg gets octopus merges.)


More information about the Mercurial-devel mailing list