hgkw/keyword.py
branchstable
changeset 843 55e4ea6d1c01
parent 842 12f6e285e4e7
child 846 d565787a8a5d
equal deleted inserted replaced
840:df93d61a7790 843:55e4ea6d1c01
   592     repo.__class__ = kwrepo
   592     repo.__class__ = kwrepo
   593 
   593 
   594     def kwfilectx_cmp(orig, self, fctx):
   594     def kwfilectx_cmp(orig, self, fctx):
   595         # keyword affects data size, comparing wdir and filelog size does
   595         # keyword affects data size, comparing wdir and filelog size does
   596         # not make sense
   596         # not make sense
   597         return self._filelog.cmp(self._filenode, fctx.data())
   597         if (fctx._filerev is None and
       
   598             (self._repo._encodefilterpats or
       
   599              kwt.match(fctx.path()) and not 'l' in fctx.flags()) or
       
   600             self.size() == fctx.size()):
       
   601             return self._filelog.cmp(self._filenode, fctx.data())
       
   602         return True
       
   603 
   598     extensions.wrapfunction(context.filectx, 'cmp', kwfilectx_cmp)
   604     extensions.wrapfunction(context.filectx, 'cmp', kwfilectx_cmp)
   599 
       
   600     extensions.wrapfunction(patch.patchfile, '__init__', kwpatchfile_init)
   605     extensions.wrapfunction(patch.patchfile, '__init__', kwpatchfile_init)
   601     extensions.wrapfunction(patch, 'diff', kw_diff)
   606     extensions.wrapfunction(patch, 'diff', kw_diff)
   602     extensions.wrapfunction(cmdutil, 'copy', kw_copy)
   607     extensions.wrapfunction(cmdutil, 'copy', kw_copy)
   603     for c in 'annotate changeset rev filediff diff'.split():
   608     for c in 'annotate changeset rev filediff diff'.split():
   604         extensions.wrapfunction(webcommands, c, kwweb_skip)
   609         extensions.wrapfunction(webcommands, c, kwweb_skip)