hgkw/keyword.py
changeset 248 2c222367dab3
parent 246 d232d7082991
child 250 b28a2832cba4
equal deleted inserted replaced
247:fc091591de7e 248:2c222367dab3
    79         keyword. In that case run "hg kwshrink", and then reimport.
    79         keyword. In that case run "hg kwshrink", and then reimport.
    80         Or, better, use bundle/unbundle to share changes.
    80         Or, better, use bundle/unbundle to share changes.
    81 '''
    81 '''
    82 
    82 
    83 from mercurial import commands, cmdutil, context, fancyopts, filelog
    83 from mercurial import commands, cmdutil, context, fancyopts, filelog
    84 from mercurial import localrepo, templater, util, hg
    84 from mercurial import localrepo, revlog, templater, util, hg
    85 from mercurial.i18n import gettext as _
    85 from mercurial.i18n import gettext as _
    86 import getopt, re, shutil, sys, tempfile, time
    86 import getopt, re, shutil, sys, tempfile, time
    87 
    87 
    88 # backwards compatibility hacks
    88 # backwards compatibility hacks
    89 
    89 
   291         '''Removes keyword substitutions for comparison.'''
   291         '''Removes keyword substitutions for comparison.'''
   292         text = self.kwtemplater.shrink(text)
   292         text = self.kwtemplater.shrink(text)
   293         if self.renamed(node):
   293         if self.renamed(node):
   294             t2 = super(kwfilelog, self).read(node)
   294             t2 = super(kwfilelog, self).read(node)
   295             return t2 != text
   295             return t2 != text
   296         return super(kwfilelog, self).cmp(node, text)
   296         return revlog.revlog.cmp(self, node, text)
   297 
   297 
   298 def _keywordmatcher(ui, repo):
   298 def _keywordmatcher(ui, repo):
   299     '''Collects include/exclude filename patterns for expansion
   299     '''Collects include/exclude filename patterns for expansion
   300     candidates of current configuration. Returns filename matching
   300     candidates of current configuration. Returns filename matching
   301     function if include patterns exist, None otherwise.'''
   301     function if include patterns exist, None otherwise.'''