mercurial/manifest.py
changeset 22964 2793ecb1522d
parent 22943 117e81871113
child 22965 b697fa74b475
equal deleted inserted replaced
22963:56e04741bbf1 22964:2793ecb1522d
    36                 ret[fn] = self[fn]
    36                 ret[fn] = self[fn]
    37                 flags = self._flags.get(fn, None)
    37                 flags = self._flags.get(fn, None)
    38                 if flags:
    38                 if flags:
    39                     ret._flags[fn] = flags
    39                     ret._flags[fn] = flags
    40         return ret
    40         return ret
    41     def flagsdiff(self, d2):
    41 
    42         return dicthelpers.diff(self._flags, d2._flags, "")
    42     def diff(self, m2):
       
    43         '''Finds changes between the current manifest and m2. The result is
       
    44         returned as a dict with filename as key and values of the form
       
    45         ((n1,n2),(fl1,fl2)), where n1/n2 is the nodeid in the current/other
       
    46         manifest and fl1/fl2 is the flag in the current/other manifest.'''
       
    47         flagsdiff = dicthelpers.diff(self._flags, m2._flags, "")
       
    48         fdiff = dicthelpers.diff(self, m2)
       
    49         return dicthelpers.join(fdiff, flagsdiff)
    43 
    50 
    44     def text(self):
    51     def text(self):
    45         """Get the full data of this manifest as a bytestring."""
    52         """Get the full data of this manifest as a bytestring."""
    46         fl = sorted(self)
    53         fl = sorted(self)
    47         _checkforbidden(fl)
    54         _checkforbidden(fl)