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

Sean Farley sean.michael.farley at gmail.com
Tue Jul 9 16:54:37 CDT 2013


# HG changeset patch
# User Sean Farley <sean.michael.farley at 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.

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:


More information about the Mercurial-devel mailing list