hgkw/keyword.py
branchkwmap-templates
changeset 143 3485b0ef99c4
parent 142 aedce5bcc9eb
child 144 19b3d1de3db0
equal deleted inserted replaced
142:aedce5bcc9eb 143:3485b0ef99c4
   205             candidates = [f for f in candidates if f not in removed
   205             candidates = [f for f in candidates if f not in removed
   206                     and not self._link(f) and self.kwfmatcher(f)]
   206                     and not self._link(f) and self.kwfmatcher(f)]
   207             if not candidates:
   207             if not candidates:
   208                 return node
   208                 return node
   209 
   209 
   210             kwt = kwtemplater(self.ui, self)
   210             wrelease = False
   211             kwt.overwrite(candidates, node)
   211             if not wlock:
       
   212                 wlock = self.wlock()
       
   213                 wrelease = True
       
   214             try:
       
   215                 kwt = kwtemplater(self.ui, self)
       
   216                 kwt.overwrite(candidates, node)
       
   217             finally:
       
   218                 if wrelease:
       
   219                     wlock.release()
   212             return node
   220             return node
   213 
   221 
   214     class kwfilelog(filelog.filelog):
   222     class kwfilelog(filelog.filelog):
   215         '''
   223         '''
   216         Superclass over filelog to customize it's read, add, cmp methods.
   224         Superclass over filelog to customize it's read, add, cmp methods.