status: do not reverse deleted and unknown stable 3.1
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 01 Aug 2014 13:01:35 -0700
branchstable
changeset 21973 3178e4989202
parent 21972 8864528874f7
child 21974 76b74ea7ac58
status: do not reverse deleted and unknown When reversing a status, trading "added" and "removed" make sense. Reversing "deleted" and "unknown" does not. We stop doing it. The reversing is documented in place for the poor soul not even able to remember the index of all status elements by heart.
mercurial/context.py
--- a/mercurial/context.py	Fri Aug 01 12:49:00 2014 -0700
+++ b/mercurial/context.py	Fri Aug 01 13:01:35 2014 -0700
@@ -320,7 +320,8 @@
                              listunknown)
 
         if reversed:
-            r[1], r[2], r[3], r[4] = r[2], r[1], r[4], r[3]
+            # reverse added and removed
+            r[1], r[2] = r[2], r[1]
 
         if listsubrepos:
             for subpath, sub in scmutil.itersubrepos(ctx1, ctx2):