evolve: fix manifest usage to match upstream stable
authorDurham Goode <durham@fb.com>
Fri, 13 Mar 2015 09:05:34 -0700
branchstable
changeset 1211 9523c027a240
parent 1210 1f8428096078
child 1212 2c1b6e2ec59a
child 1228 72a3f8d307b2
evolve: fix manifest usage to match upstream The manifest class upstream is no longer a dictionary, so switch to using an API it does support.
hgext/evolve.py
--- a/hgext/evolve.py	Fri Mar 13 09:04:12 2015 -0700
+++ b/hgext/evolve.py	Fri Mar 13 09:05:34 2015 -0700
@@ -1422,8 +1422,11 @@
         files = set()
         copied = copies.pathcopies(prec, bumped)
         precmanifest = prec.manifest()
-        for key, val in bumped.manifest().items():
-            if precmanifest.pop(key, None) != val:
+        for key, val in bumped.manifest().iteritems():
+            precvalue = precmanifest.get(key, None)
+            if precvalue is not None:
+                del precmanifest[key]
+            if precvalue != val:
                 files.add(key)
         files.update(precmanifest)  # add missing files
         # commit it