Changeset - d0c0c9e4e71c
[Not reviewed]
default
0 1 0
Mads Kiilerich - 9 years ago 2016-07-28 16:28:34
madski@unity3d.com
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.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/vcs/backends/hg/changeset.py
Show inline comments
 
@@ -265,15 +265,15 @@ class MercurialChangeset(BaseChangeset):
 
        """
 
        Returns a generator of four element tuples with
 
            lineno, sha, changeset lazy loader and line
 
        """
 

	
 
        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,
 
                     subrepos=False):
 
        """
 
        Fills up given stream.
0 comments (0 inline, 0 general)