--- a/hgkw/keyword.py Tue Feb 13 18:03:12 2007 +0100
+++ b/hgkw/keyword.py Wed Feb 14 02:44:25 2007 +0100
@@ -76,12 +76,12 @@
from mercurial.i18n import gettext as _
demandload(globals(), 'mercurial:cmdutil,templater,util')
demandload(globals(), 'mercurial:context,filelog,revlog')
- demandload(globals(), 'os.path re time')
+ demandload(globals(), 're time')
except ImportError: # demandimport
from mercurial.i18n import _
from mercurial import cmdutil, templater, util
from mercurial import context, filelog, revlog
- import os.path, re, time
+ import re, time
deftemplates = {
'Revision': '{node|short}',
@@ -192,6 +192,8 @@
'''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,
@@ -200,8 +202,8 @@
return node
candidates = self.changelog.read(node)[3]
- candidates = [f for f in candidates
- if self.kwfmatcher(f) and os.path.isfile(self.wjoin(f))]
+ 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