Changeset - 0c58b6dc5512
[Not reviewed]
default
0 1 0
Thomas De Schampheleire - 11 years ago 2015-05-04 18:47:16
thomas.de.schampheleire@gmail.com
hg: show code function in diffs

Just like already done for git diffs, show the function containing the
change in the hunk header of a diff, if available:

@@ -19,7 +19,7 @@ int func(void)

instead of

@@ -19,7 +19,7 @@
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/vcs/backends/hg/repository.py
Show inline comments
 
@@ -261,12 +261,13 @@ class MercurialRepository(BaseRepository
 
            file_filter = match(self.path, '', [path])
 
        else:
 
            file_filter = None
 

	
 
        return ''.join(patch.diff(self._repo, rev1, rev2, match=file_filter,
 
                          opts=diffopts(git=True,
 
                                        showfunc=True,
 
                                        ignorews=ignore_whitespace,
 
                                        context=context)))
 

	
 
    @classmethod
 
    def _check_url(cls, url, repoui=None):
 
        """
0 comments (0 inline, 0 general)