hgkw/keyword.py
branchkwmap-templates
changeset 155 b62dacbd2166
parent 153 7e97ea52335a
child 156 0382bccf861e
--- a/hgkw/keyword.py	Wed Mar 07 23:53:50 2007 +0100
+++ b/hgkw/keyword.py	Thu Mar 22 12:36:51 2007 +0100
@@ -90,12 +90,12 @@
     from mercurial.i18n import gettext as _
     demandload(globals(), 'mercurial:commands,fancyopts,templater,util')
     demandload(globals(), 'mercurial:cmdutil,context,filelog,revlog')
-    demandload(globals(), 're sys time')
+    demandload(globals(), 'os re sys time')
 except ImportError:                    # demandimport
     from mercurial.i18n import _
     from mercurial import commands, fancyopts, templater, util
     from mercurial import cmdutil, context, filelog, revlog
-    import re, sys, time
+    import os, re, sys, time
 
 deftemplates = {
         'Revision': '{node|short}',
@@ -278,7 +278,8 @@
 
                 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)]
+                        and not os.path.islink(self.wjoin(f))
+                        and self.kwfmatcher(f)]
                 if not candidates:
                     return node