changeset 6031:d0c0c9e4e71c

annotate: invoke hg annotate in a way that is forward compatible with Mercurial 3.9 https://selenic.com/hg/rev/576ff900fcc7 changed the behaviour when linenumber=None. linenumber=False has been tested to work with our oldest supported Mercurial version.
author Mads Kiilerich <madski@unity3d.com>
date Thu, 28 Jul 2016 16:28:34 +0200
parents 5dfaa9f1fdb2
children 94db428caa4e
files kallithea/lib/vcs/backends/hg/changeset.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/vcs/backends/hg/changeset.py	Thu Jul 28 16:28:34 2016 +0200
+++ b/kallithea/lib/vcs/backends/hg/changeset.py	Thu Jul 28 16:28:34 2016 +0200
@@ -268,9 +268,9 @@
         """
 
         fctx = self._get_filectx(path)
-        for i, annotate_data in enumerate(fctx.annotate()):
+        for i, annotate_data in enumerate(fctx.annotate(linenumber=False)):
             ln_no = i + 1
-            sha = hex(annotate_data[0].node())
+            sha = hex(annotate_data[0][0].node())
             yield (ln_no, sha, lambda: self.repository.get_changeset(sha), annotate_data[1],)
 
     def fill_archive(self, stream=None, kind='tgz', prefix=None,