diff -r 19b3d1de3db0 -r 1c2cefa97b96 hgkw/keyword.py --- a/hgkw/keyword.py Wed Feb 14 03:03:16 2007 +0100 +++ b/hgkw/keyword.py Thu Feb 15 09:25:05 2007 +0100 @@ -228,32 +228,31 @@ force_editor=False, p1=None, p2=None, extra={}): '''Wraps commit, expanding keywords of committed and configured files in working directory.''' - - removed = self.status()[2] - - node = super(kwrepo, self).commit(files=files, - text=text, user=user, date=date, - match=match, force=force, lock=lock, wlock=wlock, - force_editor=force_editor, p1=p1, p2=p2, extra=extra) - if node is None: - return node - - candidates = self.changelog.read(node)[3] - candidates = [f for f in candidates if f not in removed - and not self._link(f) and self.kwfmatcher(f)] - if not candidates: - return node - wrelease = False if not wlock: wlock = self.wlock() wrelease = True try: + removed = self.status()[2] + + node = super(kwrepo, self).commit(files=files, + text=text, user=user, date=date, + match=match, force=force, lock=lock, wlock=wlock, + force_editor=force_editor, p1=p1, p2=p2, extra=extra) + if node is None: + return node + + candidates = self.changelog.read(node)[3] + candidates = [f for f in candidates if f not in removed + and not self._link(f) and self.kwfmatcher(f)] + if not candidates: + return node + kwt = kwtemplater(self.ui, self) kwt.overwrite(candidates, node) + return node finally: if wrelease: wlock.release() - return node repo.__class__ = kwrepo