Patchwork [7,of,9] manifestdict: add a method to diff _flags

login
register
mail settings
Submitter Siddharth Agarwal
Date March 25, 2013, 12:27 a.m.
Message ID <97d7455d7bd827c8a3c2.1364171271@sid0x220>
Download mbox | patch
Permalink /patch/1182/
State Superseded
Commit 40b4b1f9b7a0d24988abbb0215c83c547d8adc9d
Headers show

Comments

Siddharth Agarwal - March 25, 2013, 12:27 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# 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.

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):