--- a/hgkw/keyword.py Thu Feb 07 15:13:37 2008 +0100
+++ b/hgkw/keyword.py Sat Feb 09 22:17:31 2008 +0100
@@ -84,7 +84,7 @@
from mercurial import patch, localrepo, templater, templatefilters, util
from mercurial.node import *
from mercurial.i18n import _
-import re, shutil, tempfile, time
+import re, shutil, tempfile, time, os
commands.optionalrepo += ' kwdemo'
@@ -389,7 +389,9 @@
if opts.get('untracked'):
files += unknown
files.sort()
- kwfiles = [f for f in files if _iskwfile(f, repo._link)]
+ wctx = repo.workingctx()
+ islink = lambda p: 'l' in wctx.fileflags(p)
+ kwfiles = [f for f in files if _iskwfile(f, islink)]
cwd = pats and repo.getcwd() or ''
kwfstats = not opts.get('ignore') and (('K', kwfiles),) or ()
if opts.get('all') or opts.get('ignore'):
@@ -425,7 +427,7 @@
try:
if (not repo.local() or hgcmd in nokwcommands.split()
- or '.hg' in repo.root.split('/')
+ or '.hg' in repo.root.split(os.sep)
or repo._url.startswith('bundle:')):
return
except AttributeError: