[PATCH 1 of 2 V2] evolve: adapt to the new metadata storage

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Oct 16 15:17:24 CDT 2014


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1413458400 25200
#      Thu Oct 16 04:20:00 2014 -0700
# Node ID da565c825429dab5f8f638f6a4c50bcebd4bed2c
# Parent  aabb145058d7f5d5428f8d9bb7dd70a652fee779
evolve: adapt to the new metadata storage

Metadata are not stored as a "list" of (key, value) tuple instead of a binary
blob.

This adapt to ef880e28e56a in Mercurial.

diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -991,14 +991,15 @@ def cmddebugobsstorestat(ui, repo):
     for mark in store:
         if mark[0] in nm:
             known += 1
         nbsucs = len(mark[1])
         sucscount[min(nbsucs, 3)] += 1
-        meta = obsolete.decodemeta(mark[3])
-        for key in meta:
+        meta = mark[3]
+        for key, value in meta:
             metakeys.setdefault(key, 0)
             metakeys[key] += 1
+        meta = dict(meta)
         parents = [meta.get('p1'), meta.get('p2')]
         parents = [node.bin(p) for p in parents if p is not None]
         if parents:
             parentsdata += 1
         # cluster handling


More information about the Mercurial-devel mailing list