Mercurial > hg
comparison hgext/keyword.py @ 10712:fbe138da6b38
keyword: 1 variable name for overwriting candidates
author | Christian Ebert <blacktrash@gmx.net> |
---|---|
date | Tue, 16 Mar 2010 22:28:23 +0100 |
parents | 2df044888693 |
children | b9c3f8e88e4f |
comparison
equal
deleted
inserted
replaced
10711:2df044888693 | 10712:fbe138da6b38 |
---|---|
160 '''Returns true if path matches [keyword] pattern | 160 '''Returns true if path matches [keyword] pattern |
161 and is not a symbolic link. | 161 and is not a symbolic link. |
162 Caveat: localrepository._link fails on Windows.''' | 162 Caveat: localrepository._link fails on Windows.''' |
163 return self.match(path) and not 'l' in flagfunc(path) | 163 return self.match(path) and not 'l' in flagfunc(path) |
164 | 164 |
165 def overwrite(self, node, expand, files): | 165 def overwrite(self, node, expand, candidates): |
166 '''Overwrites selected files expanding/shrinking keywords.''' | 166 '''Overwrites selected files expanding/shrinking keywords.''' |
167 ctx = self.repo[node] | 167 ctx = self.repo[node] |
168 mf = ctx.manifest() | 168 mf = ctx.manifest() |
169 if node is not None: # commit | 169 if node is not None: # commit |
170 files = [f for f in ctx.files() if f in mf] | 170 candidates = [f for f in ctx.files() if f in mf] |
171 candidates = [f for f in files if self.iskwfile(f, ctx.flags)] | 171 candidates = [f for f in candidates if self.iskwfile(f, ctx.flags)] |
172 if candidates: | 172 if candidates: |
173 self.restrict = True # do not expand when reading | 173 self.restrict = True # do not expand when reading |
174 msg = (expand and _('overwriting %s expanding keywords\n') | 174 msg = (expand and _('overwriting %s expanding keywords\n') |
175 or _('overwriting %s shrinking keywords\n')) | 175 or _('overwriting %s shrinking keywords\n')) |
176 for f in candidates: | 176 for f in candidates: |