manifestdict: add a method to diff _flags
authorSiddharth Agarwal <sid0@fb.com>
Sun, 24 Mar 2013 17:17:38 -0700
changeset 18821 40b4b1f9b7a0
parent 18820 a45e44d76c81
child 18822 381c0ef72a56
manifestdict: add a method to diff _flags This will be used in an upcoming patch.
mercurial/manifest.py
--- a/mercurial/manifest.py	Mon Mar 25 17:40:39 2013 -0700
+++ b/mercurial/manifest.py	Sun Mar 24 17:17:38 2013 -0700
@@ -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 @@
         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):