From patchwork Mon Mar 25 00:27:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [7,of,9] manifestdict: add a method to diff _flags From: Siddharth Agarwal X-Patchwork-Id: 1182 Message-Id: <97d7455d7bd827c8a3c2.1364171271@sid0x220> To: mercurial-devel@selenic.com Date: Sun, 24 Mar 2013 17:27:51 -0700 # HG changeset patch # User Siddharth Agarwal # Date 1364170658 25200 # Sun Mar 24 17:17:38 2013 -0700 # Node ID 97d7455d7bd827c8a3c20761b266eb9cfc11ed08 # Parent 68e201923432581aae3208a0dbe47afe55db6d42 manifestdict: add a method to diff _flags This will be used in an upcoming patch. diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -6,7 +6,7 @@ # GNU General Public License version 2 or any later version. from i18n import _ -import mdiff, parsers, error, revlog, util +import mdiff, parsers, error, revlog, util, dicthelpers import array, struct class manifestdict(dict): @@ -25,6 +25,8 @@ class manifestdict(dict): self._flags[f] = flags def copy(self): return manifestdict(self, dict.copy(self._flags)) + def flagsdiff(self, d2): + return dicthelpers.diff(self._flags, d2._flags, "") class manifest(revlog.revlog): def __init__(self, opener):