# HG changeset patch # User Thomas De Schampheleire # Date 2015-05-04 18:47:16 # Node ID 0c58b6dc55120dd609daf7f13b02f5c128292fb7 # Parent 196c46444d9881b8f8955159d198c7a6e455b88c 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 @@ diff --git a/kallithea/lib/vcs/backends/hg/repository.py b/kallithea/lib/vcs/backends/hg/repository.py --- a/kallithea/lib/vcs/backends/hg/repository.py +++ b/kallithea/lib/vcs/backends/hg/repository.py @@ -264,6 +264,7 @@ class MercurialRepository(BaseRepository return ''.join(patch.diff(self._repo, rev1, rev2, match=file_filter, opts=diffopts(git=True, + showfunc=True, ignorews=ignore_whitespace, context=context)))