Show More
@@ -104,6 +104,7 b' from mercurial import (' | |||||
104 | match, |
|
104 | match, | |
105 | patch, |
|
105 | patch, | |
106 | pathutil, |
|
106 | pathutil, | |
|
107 | pycompat, | |||
107 | registrar, |
|
108 | registrar, | |
108 | scmutil, |
|
109 | scmutil, | |
109 | templatefilters, |
|
110 | templatefilters, | |
@@ -380,6 +381,7 b' def _status(ui, repo, wctx, kwt, *pats, ' | |||||
380 | '''Bails out if [keyword] configuration is not active. |
|
381 | '''Bails out if [keyword] configuration is not active. | |
381 | Returns status of working directory.''' |
|
382 | Returns status of working directory.''' | |
382 | if kwt: |
|
383 | if kwt: | |
|
384 | opts = pycompat.byteskwargs(opts) | |||
383 | return repo.status(match=scmutil.match(wctx, pats, opts), clean=True, |
|
385 | return repo.status(match=scmutil.match(wctx, pats, opts), clean=True, | |
384 | unknown=opts.get('unknown') or opts.get('all')) |
|
386 | unknown=opts.get('unknown') or opts.get('all')) | |
385 | if ui.configitems('keyword'): |
|
387 | if ui.configitems('keyword'): | |
@@ -436,16 +438,16 b' def demo(ui, repo, *args, **opts):' | |||||
436 | ui.setconfig('keywordset', 'svn', svn, 'keyword') |
|
438 | ui.setconfig('keywordset', 'svn', svn, 'keyword') | |
437 |
|
439 | |||
438 | uikwmaps = ui.configitems('keywordmaps') |
|
440 | uikwmaps = ui.configitems('keywordmaps') | |
439 | if args or opts.get('rcfile'): |
|
441 | if args or opts.get(r'rcfile'): | |
440 | ui.status(_('\n\tconfiguration using custom keyword template maps\n')) |
|
442 | ui.status(_('\n\tconfiguration using custom keyword template maps\n')) | |
441 | if uikwmaps: |
|
443 | if uikwmaps: | |
442 | ui.status(_('\textending current template maps\n')) |
|
444 | ui.status(_('\textending current template maps\n')) | |
443 | if opts.get('default') or not uikwmaps: |
|
445 | if opts.get(r'default') or not uikwmaps: | |
444 | if svn: |
|
446 | if svn: | |
445 | ui.status(_('\toverriding default svn keywordset\n')) |
|
447 | ui.status(_('\toverriding default svn keywordset\n')) | |
446 | else: |
|
448 | else: | |
447 | ui.status(_('\toverriding default cvs keywordset\n')) |
|
449 | ui.status(_('\toverriding default cvs keywordset\n')) | |
448 | if opts.get('rcfile'): |
|
450 | if opts.get(r'rcfile'): | |
449 | ui.readconfig(opts.get('rcfile')) |
|
451 | ui.readconfig(opts.get('rcfile')) | |
450 | if args: |
|
452 | if args: | |
451 | # simulate hgrc parsing |
|
453 | # simulate hgrc parsing | |
@@ -453,7 +455,7 b' def demo(ui, repo, *args, **opts):' | |||||
453 | repo.vfs.write('hgrc', rcmaps) |
|
455 | repo.vfs.write('hgrc', rcmaps) | |
454 | ui.readconfig(repo.vfs.join('hgrc')) |
|
456 | ui.readconfig(repo.vfs.join('hgrc')) | |
455 | kwmaps = dict(ui.configitems('keywordmaps')) |
|
457 | kwmaps = dict(ui.configitems('keywordmaps')) | |
456 | elif opts.get('default'): |
|
458 | elif opts.get(r'default'): | |
457 | if svn: |
|
459 | if svn: | |
458 | ui.status(_('\n\tconfiguration using default svn keywordset\n')) |
|
460 | ui.status(_('\n\tconfiguration using default svn keywordset\n')) | |
459 | else: |
|
461 | else: | |
@@ -543,6 +545,7 b' def files(ui, repo, *pats, **opts):' | |||||
543 | else: |
|
545 | else: | |
544 | cwd = '' |
|
546 | cwd = '' | |
545 | files = [] |
|
547 | files = [] | |
|
548 | opts = pycompat.byteskwargs(opts) | |||
546 | if not opts.get('unknown') or opts.get('all'): |
|
549 | if not opts.get('unknown') or opts.get('all'): | |
547 | files = sorted(status.modified + status.added + status.clean) |
|
550 | files = sorted(status.modified + status.added + status.clean) | |
548 | kwfiles = kwt.iskwfile(files, wctx) |
|
551 | kwfiles = kwt.iskwfile(files, wctx) |
General Comments 0
You need to be logged in to leave comments.
Login now