Patchwork [06,of,14,RFC] context: explicitly unpack variable in workingctx._manifest

login
register
mail settings
Submitter Sean Farley
Date July 9, 2013, 9:54 p.m.
Message ID <5c33cf436b3fa3f20816.1373406877@laptop.local>
Download mbox | patch
Permalink /patch/1815/
State Changes Requested
Headers show

Comments

Sean Farley - July 9, 2013, 9:54 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1373323646 18000
#      Mon Jul 08 17:47:26 2013 -0500
# Node ID 5c33cf436b3fa3f208166b32b2529fb2caec4f53
# Parent  cd81a482ec491eb3fefa6c6772d3d1bfeb7e000b
context: explicitly unpack variable in workingctx._manifest

This is unneeded for now but protects against a future patch that changes
memctx to inherit from workingctx.

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -891,11 +891,12 @@ 
         else:
             getman = lambda f: man
 
         copied = self._repo.dirstate.copies()
         ff = self._flagfunc
-        modified, added, removed, deleted = self._status
+        modified, added, removed, deleted = self._status[:4]
+
         for i, l in (("a", added), ("m", modified)):
             for f in l:
                 orig = copied.get(f, f)
                 man[f] = getman(orig).get(orig, nullid) + i
                 try: