D5612: fastannotate: slice strings to get single character
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Wed Jan 16 12:22:16 EST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe40b7a504b1d: fastannotate: slice strings to get single character (authored by durin42, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5612?vs=13273&id=13292
REVISION DETAIL
https://phab.mercurial-scm.org/D5612
AFFECTED FILES
hgext/fastannotate/formatter.py
hgext/fastannotate/protocol.py
CHANGE DETAILS
diff --git a/hgext/fastannotate/protocol.py b/hgext/fastannotate/protocol.py
--- a/hgext/fastannotate/protocol.py
+++ b/hgext/fastannotate/protocol.py
@@ -98,7 +98,7 @@
state = 0 # 0: vfspath, 1: size
vfspath = size = ''
while i < l:
- ch = payload[i]
+ ch = payload[i:i + 1]
if ch == '\0':
if state == 1:
result[vfspath] = buffer(payload, i + 1, int(size))
diff --git a/hgext/fastannotate/formatter.py b/hgext/fastannotate/formatter.py
--- a/hgext/fastannotate/formatter.py
+++ b/hgext/fastannotate/formatter.py
@@ -103,7 +103,7 @@
result += ': ' + self.ui.label('-' + lines[i],
'diff.deleted')
- if result[-1] != '\n':
+ if result[-1:] != '\n':
result += '\n'
self.ui.write(result)
To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list