D5102: beautifygraph: add configs for customizing the characters

hooper (Danny Hooper) phabricator at mercurial-scm.org
Tue Oct 30 17:29:27 EDT 2018


hooper added a comment.


  I'll elaborate a bit. I think the idea of using unicode to make the graph good looking is flawed. There are no characters that properly serve common cases like this:
  
    o
    |
     \
      o
  
  That's part of why there was some disagreement in early discussion of this extension.
  
  I think it's a bad user experience, because if the graph looks 95% like a connected drawing, these broken areas are going to look like malfunctions (whereas we started with a stylized ascii drawing where the limitations are obvious to the user).
  
  Additionally, the existing graphlog output is lossy. The two pipes in this example do not have the same meaning:
  
    o
    |
    |
     \
       o
  
  Even if we had the unicode characters/custom font needed to make this work, we would need at least 5 configurable variants of what is currently just a pipe. You would need hundreds of distinct characters to support all combinations of the 8 horizontal and diagonal edges in each character/cell of the graph rendering. More than double that to support dashed lines. Maybe exclude some unused characters. It's hard to imagine making that easy to configure.
  
  You can also imagine having the graphlog output optionally use only horizontal/vertical edges so this can be done properly with box drawing characters. This is would complicate graphlog itself considerably, regardless of configuration.
  
  Meanwhile, this patch would be useful to some of our users, and it keeps the problems contained within the extension.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5102

To: hooper, #hg-reviewers
Cc: spectral, mercurial-devel


More information about the Mercurial-devel mailing list