Changeset - 25dae19e0719
[Not reviewed]
stable
0 1 0
Mads Kiilerich - 9 years ago 2016-07-28 16:28:34
madski@unity3d.com
Grafted from: 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.
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
 
@@ -259,27 +259,27 @@ class MercurialChangeset(BaseChangeset):
 
            if limit is not None and cnt == limit:
 
                break
 

	
 
        return [self.repository.get_changeset(node) for node in hist]
 

	
 
    def get_file_annotate(self, path):
 
        """
 
        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.
 

	
 
        :param stream: file like object.
 
        :param kind: one of following: ``zip``, ``tgz`` or ``tbz2``.
 
            Default: ``tgz``.
 
        :param prefix: name of root directory in archive.
 
            Default is repository name and changeset's raw_id joined with dash
0 comments (0 inline, 0 general)