##// END OF EJS Templates
Merge with crew
Brendan Cully -
r8960:8a5657ec merge default
parent child Browse files
Show More
@@ -359,27 +359,40 b' def expand(ui, repo, *pats, **opts):'
359 _kwfwrite(ui, repo, True, *pats, **opts)
359 _kwfwrite(ui, repo, True, *pats, **opts)
360
360
361 def files(ui, repo, *pats, **opts):
361 def files(ui, repo, *pats, **opts):
362 '''print filenames configured for keyword expansion
362 '''show files configured for keyword expansion
363
363
364 Check which filenames in the working directory are matched by the
364 List which files in the working directory are matched by the
365 [keyword] configuration patterns.
365 [keyword] configuration patterns.
366
366
367 Useful to prevent inadvertent keyword expansion and to speed up
367 Useful to prevent inadvertent keyword expansion and to speed up
368 execution by including only filenames that are actual candidates
368 execution by including only files that are actual candidates
369 for expansion.
369 for expansion.
370
370
371 Use -u/--untracked to display untracked filenames as well.
371 See "hg help keyword" on how to construct patterns both for
372 inclusion and exclusion of files.
373
374 Use -u/--untracked to list untracked files as well.
375
376 With -a/--all and -v/--verbose the codes used to show the status
377 of files are:
378 K = keyword expansion candidate
379 k = keyword expansion candidate (untracked)
380 I = ignored
381 i = ignored (untracked)
372 '''
382 '''
373 kwt = kwtools['templater']
383 kwt = kwtools['templater']
374 status = _status(ui, repo, kwt, opts.get('untracked'), *pats, **opts)
384 status = _status(ui, repo, kwt, opts.get('untracked'), *pats, **opts)
375 modified, added, removed, deleted, unknown, ignored, clean = status
385 modified, added, removed, deleted, unknown, ignored, clean = status
376 files = sorted(modified + added + clean + unknown)
386 files = sorted(modified + added + clean)
377 wctx = repo[None]
387 wctx = repo[None]
378 kwfiles = [f for f in files if kwt.iskwfile(f, wctx.flags)]
388 kwfiles = [f for f in files if kwt.iskwfile(f, wctx.flags)]
389 kwuntracked = [f for f in unknown if kwt.iskwfile(f, wctx.flags)]
379 cwd = pats and repo.getcwd() or ''
390 cwd = pats and repo.getcwd() or ''
380 kwfstats = not opts.get('ignore') and (('K', kwfiles),) or ()
391 kwfstats = (not opts.get('ignore') and
392 (('K', kwfiles), ('k', kwuntracked),) or ())
381 if opts.get('all') or opts.get('ignore'):
393 if opts.get('all') or opts.get('ignore'):
382 kwfstats += (('I', [f for f in files if f not in kwfiles]),)
394 kwfstats += (('I', [f for f in files if f not in kwfiles]),
395 ('i', [f for f in unknown if f not in kwuntracked]),)
383 for char, filenames in kwfstats:
396 for char, filenames in kwfstats:
384 fmt = (opts.get('all') or ui.verbose) and '%s %%s\n' % char or '%s\n'
397 fmt = (opts.get('all') or ui.verbose) and '%s %%s\n' % char or '%s\n'
385 for f in filenames:
398 for f in filenames:
@@ -484,8 +484,8 b' def bundle(ui, repo, fname, dest=None, *'
484 parameters. To create a bundle containing all changesets, use
484 parameters. To create a bundle containing all changesets, use
485 -a/--all (or --base null).
485 -a/--all (or --base null).
486
486
487 To change the compression method applied, use the -t/--type
487 You can change compression method with the -t/--type option.
488 option. The available compression methods are: none, bzip2, and
488 The available compression methods are: none, bzip2, and
489 gzip (by default, bundles are compressed using bzip2).
489 gzip (by default, bundles are compressed using bzip2).
490
490
491 The bundle file can then be transferred using conventional means
491 The bundle file can then be transferred using conventional means
@@ -50,7 +50,7 b' list of commands:'
50
50
51 kwdemo print [keywordmaps] configuration and an expansion example
51 kwdemo print [keywordmaps] configuration and an expansion example
52 kwexpand expand keywords in the working directory
52 kwexpand expand keywords in the working directory
53 kwfiles print filenames configured for keyword expansion
53 kwfiles show files configured for keyword expansion
54 kwshrink revert expanded keywords in the working directory
54 kwshrink revert expanded keywords in the working directory
55
55
56 enabled extensions:
56 enabled extensions:
General Comments 0
You need to be logged in to leave comments. Login now