This is an archive of the discontinued Mercurial Phabricator instance.

tests: make drawdag try to draw nodes in alphabetical order
AbandonedPublic

Authored by martinvonz on Jul 14 2020, 1:11 AM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

drawdag currently adds nodes in alphabetical order, but "layer by
layer" in a BFS traversal. I find that that makes it harder to reason
about and convince drawdag to add in the order I want it to draw. This
patch makes it so we don't do the "layer by layer" thing and we
instead add the first possible node in alphabetical order every time.

I apologize for the impact on the test cases.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

martinvonz created this revision.Jul 14 2020, 1:11 AM

Are you trying to optimise you experience for here? log ouput with less crossing or version number in other command output ?

Are you trying to optimise you experience for here? log ouput with less crossing or version number in other command output ?

Good question. It was quite a long time ago that I wrote this patch. I think I just wanted to be able to produce a graph that looked the way I wanted in graphlog. I found it very hard to do that before this patch. The order would also matter for tests that care about stripping and linkrev, but I can't remember if I had any such cases in mind when I wrote the patch,

Could the hg log ordering thing be solved by using topological ordering when displaying thing ?

martinvonz abandoned this revision.Jul 16 2020, 11:15 AM

Could the hg log ordering thing be solved by using topological ordering when displaying thing ?

That's possible. I'll abandon this patch and I might get back to it later if I can better remember what the motivation was :)