[PATCH] hg: show code function in diffs
Thomas De Schampheleire
patrickdepinguin at gmail.com
Mon May 4 14:10:06 EDT 2015
# HG changeset patch
# User Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
# Date 1430758036 -7200
# Mon May 04 18:47:16 2015 +0200
# Node ID 1f24798c84fac57d2c3c2c453289a9ce9c9a3496
# Parent f318ddf79897faeb0d8ba520014d993657249803
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)))
More information about the kallithea-general
mailing list