From patchwork Tue Mar 26 00:51:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2,of,4,V2] manifestdict: add a method to diff _flags From: Siddharth Agarwal X-Patchwork-Id: 1195 Message-Id: <5e3f01d5d4440fc71bac.1364259081@sid0x220> To: mercurial-devel@selenic.com Date: Mon, 25 Mar 2013 17:51:21 -0700 # HG changeset patch # User Siddharth Agarwal # Date 1364170658 25200 # Sun Mar 24 17:17:38 2013 -0700 # Node ID 5e3f01d5d4440fc71bac7ce64697698e6100cf4b # Parent bc4c228833d0a2bcc7c9a0e3ba4c364fe9157b4e 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):