equal
deleted
inserted
replaced
278 |
278 |
279 def demo(ui, repo, *args, **opts): |
279 def demo(ui, repo, *args, **opts): |
280 '''print [keywordmaps] configuration and an expansion example |
280 '''print [keywordmaps] configuration and an expansion example |
281 |
281 |
282 Show current, custom, or default keyword template maps and their |
282 Show current, custom, or default keyword template maps and their |
283 expansion. |
283 expansions. |
284 |
284 |
285 Extend current configuration by specifying maps as arguments and |
285 Extend current configuration by specifying maps as arguments and |
286 optionally by reading from an additional hgrc file. |
286 optionally by reading from an additional hgrc file. |
287 |
287 |
288 Override current keyword template maps with "default" option. |
288 Override current keyword template maps with "default" option. |
356 ui.write(repo.wread(fn)) |
356 ui.write(repo.wread(fn)) |
357 ui.debug(_('\nremoving temporary repository %s\n') % tmpdir) |
357 ui.debug(_('\nremoving temporary repository %s\n') % tmpdir) |
358 shutil.rmtree(tmpdir, ignore_errors=True) |
358 shutil.rmtree(tmpdir, ignore_errors=True) |
359 |
359 |
360 def expand(ui, repo, *pats, **opts): |
360 def expand(ui, repo, *pats, **opts): |
361 '''expand keywords in working directory |
361 '''expand keywords in the working directory |
362 |
362 |
363 Run after (re)enabling keyword expansion. |
363 Run after (re)enabling keyword expansion. |
364 |
364 |
365 kwexpand refuses to run if given files contain local changes. |
365 kwexpand refuses to run if given files contain local changes. |
366 ''' |
366 ''' |
388 fmt = (opts.get('all') or ui.verbose) and '%s %%s\n' % char or '%s\n' |
388 fmt = (opts.get('all') or ui.verbose) and '%s %%s\n' % char or '%s\n' |
389 for f in filenames: |
389 for f in filenames: |
390 ui.write(fmt % repo.pathto(f, cwd)) |
390 ui.write(fmt % repo.pathto(f, cwd)) |
391 |
391 |
392 def shrink(ui, repo, *pats, **opts): |
392 def shrink(ui, repo, *pats, **opts): |
393 '''revert expanded keywords in working directory |
393 '''revert expanded keywords in the working directory |
394 |
394 |
395 Run before changing/disabling active keywords or if you experience |
395 Run before changing/disabling active keywords or if you experience |
396 problems with "hg import" or "hg merge". |
396 problems with "hg import" or "hg merge". |
397 |
397 |
398 kwshrink refuses to run if given files contain local changes. |
398 kwshrink refuses to run if given files contain local changes. |