equal
deleted
inserted
replaced
9 '''beautify log -G output by using Unicode characters (EXPERIMENTAL) |
9 '''beautify log -G output by using Unicode characters (EXPERIMENTAL) |
10 |
10 |
11 A terminal with UTF-8 support and monospace narrow text are required. |
11 A terminal with UTF-8 support and monospace narrow text are required. |
12 ''' |
12 ''' |
13 |
13 |
14 from __future__ import absolute_import |
|
15 |
14 |
16 from mercurial.i18n import _ |
15 from mercurial.i18n import _ |
17 from mercurial import ( |
16 from mercurial import ( |
18 encoding, |
17 encoding, |
19 extensions, |
18 extensions, |
20 graphmod, |
19 graphmod, |
21 pycompat, |
|
22 templatekw, |
20 templatekw, |
23 ) |
21 ) |
24 |
22 |
25 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for |
23 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for |
26 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should |
24 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should |
52 |
50 |
53 |
51 |
54 def convertedges(line): |
52 def convertedges(line): |
55 line = b' %s ' % line |
53 line = b' %s ' % line |
56 pretty = [] |
54 pretty = [] |
57 for idx in pycompat.xrange(len(line) - 2): |
55 for idx in range(len(line) - 2): |
58 pretty.append( |
56 pretty.append( |
59 prettyedge( |
57 prettyedge( |
60 line[idx : idx + 1], |
58 line[idx : idx + 1], |
61 line[idx + 1 : idx + 2], |
59 line[idx + 1 : idx + 2], |
62 line[idx + 2 : idx + 3], |
60 line[idx + 2 : idx + 3], |