hgkw/keyword.py
branchkwmap-templates
changeset 137 bfea48fbcb88
parent 136 5e9d6c57d679
child 138 bf8622c50309
equal deleted inserted replaced
136:5e9d6c57d679 137:bfea48fbcb88
   183 
   183 
   184             node = super(kwrepo, self).commit(files=files,
   184             node = super(kwrepo, self).commit(files=files,
   185                     text=text, user=user, date=date,
   185                     text=text, user=user, date=date,
   186                     match=match, force=force, lock=lock, wlock=wlock,
   186                     match=match, force=force, lock=lock, wlock=wlock,
   187                     force_editor=force_editor, p1=p1, p2=p2, extra=extra)
   187                     force_editor=force_editor, p1=p1, p2=p2, extra=extra)
       
   188 
   188             if node is None:
   189             if node is None:
   189                 return node
   190                 return node
   190 
   191 
   191             candidates = self.changelog.read(node)[3]
   192             candidates = self.changelog.read(node)[3]
   192             candidates = [f for f in candidates
   193             candidates = [f for f in candidates
   216                      defversion=revlog.REVLOG_DEFAULT_VERSION):
   217                      defversion=revlog.REVLOG_DEFAULT_VERSION):
   217             super(kwfilelog, self).__init__(opener, path, defversion)
   218             super(kwfilelog, self).__init__(opener, path, defversion)
   218             self._repo = repo
   219             self._repo = repo
   219             self._path = path
   220             self._path = path
   220             # only init kwtemplater if needed
   221             # only init kwtemplater if needed
   221             if not isinstance(repo, int) and repo.kwfmatcher(path):
   222             if hasattr(repo, 'kwfmatcher') and repo.kwfmatcher(path):
   222                 self.kwt = kwtemplater(repo.ui, repo)
   223                 self.kwt = kwtemplater(repo.ui, repo)
   223             else:
   224             else:
   224                 self.kwt = None
   225                 self.kwt = None
   225 
   226 
   226         def read(self, node):
   227         def read(self, node):