changeset 7344:b6b3c6dc49aa

hg: don't use custom diff arguments when generating diffstats for rss feed With Mercurial 4.7, it is no longer possible to pass arguments like `git=True` to `ctx.diff()`. This will change the reported data slightly, but the difference isn't important. Also, the code should be refactored to do something similar to what we do in other places.
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 05 Aug 2018 23:16:23 +0200
parents eca8f0c07162
children daf282efa2da
files kallithea/lib/vcs/backends/hg/changeset.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/vcs/backends/hg/changeset.py	Sun Aug 05 23:16:10 2018 +0200
+++ b/kallithea/lib/vcs/backends/hg/changeset.py	Sun Aug 05 23:16:23 2018 +0200
@@ -214,10 +214,9 @@
             if not branch or branch == cs.branch:
                 return cs
 
-    def diff(self, ignore_whitespace=True, context=3):
-        return ''.join(self._ctx.diff(git=True,
-                                      ignore_whitespace=ignore_whitespace,
-                                      context=context))
+    def diff(self):
+        # Only used for feed diffstat
+        return ''.join(self._ctx.diff())
 
     def _fix_path(self, path):
         """