diff mercurial/cmdutil.py @ 23734:f4e6475950f1 stable

cmdutil.jsonchangeset: properly compute added and removed files jsonchangeset._show() was computing the reverse status of the current changeset. As a result, added files were showing up as removed and removed files were showing up as adds. There were existing tests for this code and they were flat out wrong.
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 05 Jan 2015 22:18:55 -0800
parents 424d669118d3
children b9d06fa10ef2
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Sat Jan 03 10:25:08 2015 +0900
+++ b/mercurial/cmdutil.py	Mon Jan 05 22:18:55 2015 -0800
@@ -1072,7 +1072,7 @@
                           ", ".join('"%s": "%s"' % (j(k), j(v))
                                     for k, v in ctx.extra().items()))
 
-            files = ctx.status(ctx.p1())
+            files = ctx.p1().status(ctx)
             self.ui.write(',\n  "modified": [%s]' %
                           ", ".join('"%s"' % j(f) for f in files[0]))
             self.ui.write(',\n  "added": [%s]' %