Show More
@@ -322,11 +322,11 b' class kwfilelog(filelog.filelog):' | |||
|
322 | 322 | text = self.kwt.shrink(self.path, text) |
|
323 | 323 | return super(kwfilelog, self).cmp(node, text) |
|
324 | 324 | |
|
325 | def _status(ui, repo, kwt, *pats, **opts): | |
|
325 | def _status(ui, repo, wctx, kwt, *pats, **opts): | |
|
326 | 326 | '''Bails out if [keyword] configuration is not active. |
|
327 | 327 | Returns status of working directory.''' |
|
328 | 328 | if kwt: |
|
329 |
return repo.status(match=scmutil.match( |
|
|
329 | return repo.status(match=scmutil.match(wctx, pats, opts), clean=True, | |
|
330 | 330 | unknown=opts.get('unknown') or opts.get('all')) |
|
331 | 331 | if ui.configitems('keyword'): |
|
332 | 332 | raise util.Abort(_('[keyword] patterns cannot match')) |
@@ -340,7 +340,7 b' def _kwfwrite(ui, repo, expand, *pats, *' | |||
|
340 | 340 | kwt = kwtools['templater'] |
|
341 | 341 | wlock = repo.wlock() |
|
342 | 342 | try: |
|
343 | status = _status(ui, repo, kwt, *pats, **opts) | |
|
343 | status = _status(ui, repo, wctx, kwt, *pats, **opts) | |
|
344 | 344 | modified, added, removed, deleted, unknown, ignored, clean = status |
|
345 | 345 | if modified or added or removed or deleted: |
|
346 | 346 | raise util.Abort(_('outstanding uncommitted changes')) |
@@ -475,13 +475,13 b' def files(ui, repo, *pats, **opts):' | |||
|
475 | 475 | i = ignored (not tracked) |
|
476 | 476 | ''' |
|
477 | 477 | kwt = kwtools['templater'] |
|
478 | status = _status(ui, repo, kwt, *pats, **opts) | |
|
478 | wctx = repo[None] | |
|
479 | status = _status(ui, repo, wctx, kwt, *pats, **opts) | |
|
479 | 480 | cwd = pats and repo.getcwd() or '' |
|
480 | 481 | modified, added, removed, deleted, unknown, ignored, clean = status |
|
481 | 482 | files = [] |
|
482 | 483 | if not opts.get('unknown') or opts.get('all'): |
|
483 | 484 | files = sorted(modified + added + clean) |
|
484 | wctx = repo[None] | |
|
485 | 485 | kwfiles = kwt.iskwfile(files, wctx) |
|
486 | 486 | kwdeleted = kwt.iskwfile(deleted, wctx) |
|
487 | 487 | kwunknown = kwt.iskwfile(unknown, wctx) |
General Comments 0
You need to be logged in to leave comments.
Login now