hgkw/keyword.py
changeset 507 51296bd1652f
parent 505 a93358a05b80
child 509 16b690351c0d
equal deleted inserted replaced
506:7d5c8c734b74 507:51296bd1652f
   165         Caveat: localrepository._link fails on Windows.'''
   165         Caveat: localrepository._link fails on Windows.'''
   166         return self.matcher(path) and not 'l' in flagfunc(path)
   166         return self.matcher(path) and not 'l' in flagfunc(path)
   167 
   167 
   168     def overwrite(self, node, expand, files):
   168     def overwrite(self, node, expand, files):
   169         '''Overwrites selected files expanding/shrinking keywords.'''
   169         '''Overwrites selected files expanding/shrinking keywords.'''
       
   170         ctx = self.repo[node]
       
   171         mf = ctx.manifest()
   170         if node is not None:     # commit
   172         if node is not None:     # commit
   171             ctx = self.repo[node]
       
   172             mf = ctx.manifest()
       
   173             files = [f for f in ctx.files() if f in mf]
   173             files = [f for f in ctx.files() if f in mf]
   174             notify = self.ui.debug
   174             notify = self.ui.debug
   175         else:                    # kwexpand/kwshrink
   175         else:                    # kwexpand/kwshrink
   176             ctx = self.repo[None]
       
   177             mf = ctx.manifest()
       
   178             notify = self.ui.note
   176             notify = self.ui.note
   179         candidates = [f for f in files if self.iskwfile(f, ctx.flags)]
   177         candidates = [f for f in files if self.iskwfile(f, ctx.flags)]
   180         if candidates:
   178         if candidates:
   181             self.restrict = True # do not expand when reading
   179             self.restrict = True # do not expand when reading
   182             action = expand and 'expanding' or 'shrinking'
   180             action = expand and 'expanding' or 'shrinking'