448 kwfiles = [f for f in files if ui.kwfmatcher(f) |
448 kwfiles = [f for f in files if ui.kwfmatcher(f) |
449 and not os.path.islink(repo.wjoin(f))] |
449 and not os.path.islink(repo.wjoin(f))] |
450 cwd = pats and repo.getcwd() or '' |
450 cwd = pats and repo.getcwd() or '' |
451 allf = opts['all'] |
451 allf = opts['all'] |
452 ignore = opts['ignore'] |
452 ignore = opts['ignore'] |
453 flag = (allf or ui.verbose) and 1 or 0 |
453 if ignore: |
454 if not ignore: |
454 kwfstats = () |
455 format = ('%s\n', 'K %s\n')[flag] |
455 else: |
456 for k in kwfiles: |
456 kwfstats = (('K', kwfiles),) |
457 ui.write(format % _pathto(repo, k, cwd)) |
|
458 if allf or ignore: |
457 if allf or ignore: |
459 format = ('%s\n', 'I %s\n')[flag] |
458 kwfstats += (('I', [f for f in files if f not in kwfiles]),) |
460 for i in [f for f in files if f not in kwfiles]: |
459 for char, filenames in kwfstats: |
461 ui.write(format % _pathto(repo, i, cwd)) |
460 if allf or ui.verbose: |
|
461 format = '%s %%s\n' % char |
|
462 else: |
|
463 format = '%s\n' |
|
464 for f in filenames: |
|
465 ui.write(format % repo.pathto(f, cwd)) |
462 |
466 |
463 def shrink(ui, repo, *pats, **opts): |
467 def shrink(ui, repo, *pats, **opts): |
464 '''revert expanded keywords in working directory |
468 '''revert expanded keywords in working directory |
465 |
469 |
466 Run before changing/disabling active keywords |
470 Run before changing/disabling active keywords |