localrepo: remove unneeded unpacking of r
authorSean Farley <sean.michael.farley@gmail.com>
Tue, 22 Apr 2014 19:06:37 -0500
changeset 21479 e18ef2e11219
parent 21478 3b647aed4394
child 21480 d19f491e5d5b
localrepo: remove unneeded unpacking of r This unpacking is unneeded now because previous patches have removed the need for this method to modify each of these variables in favor of passing the whole set around to pre/post hook methods of the corresponding context object.
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Tue Apr 22 13:02:38 2014 -0500
+++ b/mercurial/localrepo.py	Tue Apr 22 19:06:37 2014 -0500
@@ -1558,12 +1558,12 @@
 
         r = ctx2._poststatus(ctx1, r, match, listignored, listclean,
                              listunknown)
-        modified, added, removed, deleted, unknown, ignored, clean = r
 
         if reversed:
-            added, removed = removed, added
-
-        r = modified, added, removed, deleted, unknown, ignored, clean
+            # since we are maintaining whether we reversed ctx1 and ctx2 (due
+            # to comparing the workingctx with its parent), we need to switch
+            # back added files (r[1]) and removed files (r[2])
+            r[1], r[2] = r[2], r[1]
 
         if listsubrepos:
             for subpath, sub in scmutil.itersubrepos(ctx1, ctx2):