D3665: graph: improve graph output by using Unicode characters
johnstiles (John Stiles)
phabricator at mercurial-scm.org
Mon May 28 19:40:32 EDT 2018
johnstiles updated this revision to Diff 8920.
johnstiles added a comment.
Corrected indenting issue. (In converting from 2-space to 4-space indents, I misaligned this block.)
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D3665?vs=8919&id=8920
REVISION DETAIL
https://phab.mercurial-scm.org/D3665
AFFECTED FILES
hgext/beautifygraph.py
CHANGE DETAILS
diff --git a/hgext/beautifygraph.py b/hgext/beautifygraph.py
--- a/hgext/beautifygraph.py
+++ b/hgext/beautifygraph.py
@@ -34,13 +34,13 @@
return '\xE2\x94\x9C' # U+251C ├
if after == ' ' and not before == ' ':
return '\xE2\x94\xA4' # U+2524 ┤
- return '\xE2\x94\xBC' # U+253C ┼
- return edge
- line = ' %s ' % line
- pretty = []
- for idx in xrange(len(line) - 2):
- pretty.append(prettyedge(line[idx], line[idx + 1], line[idx + 2]))
- return ''.join(pretty)
+ return '\xE2\x94\xBC' # U+253C ┼
+ return edge
+ line = ' %s ' % line
+ pretty = []
+ for idx in xrange(len(line) - 2):
+ pretty.append(prettyedge(line[idx], line[idx + 1], line[idx + 2]))
+ return ''.join(pretty)
def getprettygraphnode(orig, *args, **kwargs):
node = orig(*args, **kwargs)
To: johnstiles, #hg-reviewers
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list