hgkw/keyword.py
changeset 701 ad66e72df159
parent 700 bf7b214673e2
child 702 c118a9c5ca24
equal deleted inserted replaced
700:bf7b214673e2 701:ad66e72df159
   160         '''Returns true if path matches [keyword] pattern
   160         '''Returns true if path matches [keyword] pattern
   161         and is not a symbolic link.
   161         and is not a symbolic link.
   162         Caveat: localrepository._link fails on Windows.'''
   162         Caveat: localrepository._link fails on Windows.'''
   163         return self.match(path) and not 'l' in flagfunc(path)
   163         return self.match(path) and not 'l' in flagfunc(path)
   164 
   164 
   165     def overwrite(self, node, expand, files):
   165     def overwrite(self, node, expand, candidates):
   166         '''Overwrites selected files expanding/shrinking keywords.'''
   166         '''Overwrites selected files expanding/shrinking keywords.'''
   167         ctx = self.repo[node]
   167         ctx = self.repo[node]
   168         mf = ctx.manifest()
   168         mf = ctx.manifest()
   169         if node is not None:     # commit
   169         if node is not None:     # commit
   170             files = [f for f in ctx.files() if f in mf]
   170             candidates = [f for f in ctx.files() if f in mf]
   171         candidates = [f for f in files if self.iskwfile(f, ctx.flags)]
   171         candidates = [f for f in candidates if self.iskwfile(f, ctx.flags)]
   172         if candidates:
   172         if candidates:
   173             self.restrict = True # do not expand when reading
   173             self.restrict = True # do not expand when reading
   174             msg = (expand and _('overwriting %s expanding keywords\n')
   174             msg = (expand and _('overwriting %s expanding keywords\n')
   175                    or _('overwriting %s shrinking keywords\n'))
   175                    or _('overwriting %s shrinking keywords\n'))
   176             for f in candidates:
   176             for f in candidates: