diff hgext/fastannotate/formatter.py @ 41262:e40b7a504b1d

fastannotate: slice strings to get single character Behaves identically on Python 3 and Python 2. Differential Revision: https://phab.mercurial-scm.org/D5612
author Augie Fackler <augie@google.com>
date Wed, 16 Jan 2019 11:55:49 -0500
parents 001f27970b60
children c2f62720e37d
line wrap: on
line diff
--- a/hgext/fastannotate/formatter.py	Wed Jan 16 11:55:01 2019 -0500
+++ b/hgext/fastannotate/formatter.py	Wed Jan 16 11:55:49 2019 -0500
@@ -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)