Patchwork [2,of,2,evolve] evolve: fix manifest usage to match upstream

login
register
mail settings
Submitter Durham Goode
Date March 13, 2015, 4:14 p.m.
Message ID <864eef97808b4faf0a23.1426263272@dev2000.prn2.facebook.com>
Download mbox | patch
Permalink /patch/8056/
State Accepted
Headers show

Comments

Durham Goode - March 13, 2015, 4:14 p.m.
# HG changeset patch
# User Durham Goode <durham@fb.com>
# Date 1426262734 25200
#      Fri Mar 13 09:05:34 2015 -0700
# Branch stable
# Node ID 864eef97808b4faf0a2384dae0d091d20d986f14
# Parent  31f4a25075b234ca280b93702998ac49f55ccad1
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.
Pierre-Yves David - March 13, 2015, 6 p.m.
On 03/13/2015 09:14 AM, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham@fb.com>
> # Date 1426262734 25200
> #      Fri Mar 13 09:05:34 2015 -0700
> # Branch stable
> # Node ID 864eef97808b4faf0a2384dae0d091d20d986f14
> # Parent  31f4a25075b234ca280b93702998ac49f55ccad1
> evolve: fix manifest usage to match upstream

These two are pushed (with a small tweak to this one)

(also: proper flag for mercurial-devel is "evolve-ext")

Patch

diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -1422,8 +1422,11 @@  def _solvebumped(ui, repo, bumped, dryru
         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