# HG changeset patch # User Matt Mackall # Date 1214508950 18000 # Node ID 2c2f35f8501f1d003e9ab95bc81007a9409548d2 # Parent 2c530e5df1d42a0eae23f428a8358bba638fdf26 manifest: remove execf/linkf methods [ original upstream description] diff -r 2c530e5df1d4 -r 2c2f35f8501f hgkw/keyword.py --- a/hgkw/keyword.py Thu Jun 26 14:35:46 2008 -0500 +++ b/hgkw/keyword.py Thu Jun 26 14:35:50 2008 -0500 @@ -165,11 +165,11 @@ return self.substitute(data, path, changenode, self.re_kw.sub) return data - def iskwfile(self, path, islink): + def iskwfile(self, path, flagfunc): '''Returns true if path matches [keyword] pattern and is not a symbolic link. Caveat: localrepository._link fails on Windows.''' - return self.matcher(path) and not islink(path) + return self.matcher(path) and not 'l' in flagfunc(path) def overwrite(self, node, expand, files): '''Overwrites selected files expanding/shrinking keywords.''' @@ -180,9 +180,8 @@ notify = self.ui.debug else: # kwexpand/kwshrink ctx = self.repo['.'] - mf = ctx.manifest() notify = self.ui.note - candidates = [f for f in files if self.iskwfile(f, mf.linkf)] + candidates = [f for f in files if self.iskwfile(f, ctx.flags)] if candidates: self.restrict = True # do not expand when reading candidates.sort() @@ -389,8 +388,7 @@ files += unknown files.sort() wctx = repo[None] - islink = lambda p: 'l' in wctx.flags(p) - kwfiles = [f for f in files if kwt.iskwfile(f, islink)] + kwfiles = [f for f in files if kwt.iskwfile(f, wctx.flags)] cwd = pats and repo.getcwd() or '' kwfstats = not opts.get('ignore') and (('K', kwfiles),) or () if opts.get('all') or opts.get('ignore'):