Show More
@@ -101,6 +101,13 b" restricted = 'merge kwexpand kwshrink re" | |||||
101 | # names of extensions using dorecord |
|
101 | # names of extensions using dorecord | |
102 | recordextensions = 'record' |
|
102 | recordextensions = 'record' | |
103 |
|
103 | |||
|
104 | colortable = { | |||
|
105 | 'kwfiles.enabled': 'green bold', | |||
|
106 | 'kwfiles.enabledunknown': 'green', | |||
|
107 | 'kwfiles.ignored': 'bold', | |||
|
108 | 'kwfiles.ignoredunknown': 'none' | |||
|
109 | } | |||
|
110 | ||||
104 | # date like in cvs' $Date |
|
111 | # date like in cvs' $Date | |
105 | utcdate = lambda x: util.datestr((x[0], 0), '%Y/%m/%d %H:%M:%S') |
|
112 | utcdate = lambda x: util.datestr((x[0], 0), '%Y/%m/%d %H:%M:%S') | |
106 | # date like in svn's $Date |
|
113 | # date like in svn's $Date | |
@@ -111,7 +118,6 b' svnutcdate = lambda x: util.datestr((x[0' | |||||
111 | # make keyword tools accessible |
|
118 | # make keyword tools accessible | |
112 | kwtools = {'templater': None, 'hgcmd': ''} |
|
119 | kwtools = {'templater': None, 'hgcmd': ''} | |
113 |
|
120 | |||
114 |
|
||||
115 | def _defaultkwmaps(ui): |
|
121 | def _defaultkwmaps(ui): | |
116 | '''Returns default keywordmaps according to keywordset configuration.''' |
|
122 | '''Returns default keywordmaps according to keywordset configuration.''' | |
117 | templates = { |
|
123 | templates = { | |
@@ -447,10 +453,12 b' def files(ui, repo, *pats, **opts):' | |||||
447 | if opts.get('all') or opts.get('ignore'): |
|
453 | if opts.get('all') or opts.get('ignore'): | |
448 | showfiles += ([f for f in files if f not in kwfiles], |
|
454 | showfiles += ([f for f in files if f not in kwfiles], | |
449 | [f for f in unknown if f not in kwunknown]) |
|
455 | [f for f in unknown if f not in kwunknown]) | |
450 | for char, filenames in zip('KkIi', showfiles): |
|
456 | kwlabels = 'enabled enabledunknown ignored ignoredunknown'.split() | |
|
457 | kwstates = zip('KkIi', showfiles, kwlabels) | |||
|
458 | for char, filenames, kwstate in kwstates: | |||
451 | fmt = (opts.get('all') or ui.verbose) and '%s %%s\n' % char or '%s\n' |
|
459 | fmt = (opts.get('all') or ui.verbose) and '%s %%s\n' % char or '%s\n' | |
452 | for f in filenames: |
|
460 | for f in filenames: | |
453 | ui.write(fmt % repo.pathto(f, cwd)) |
|
461 | ui.write(fmt % repo.pathto(f, cwd), label='kwfiles.' + kwstate) | |
454 |
|
462 | |||
455 | def shrink(ui, repo, *pats, **opts): |
|
463 | def shrink(ui, repo, *pats, **opts): | |
456 | '''revert expanded keywords in the working directory |
|
464 | '''revert expanded keywords in the working directory |
General Comments 0
You need to be logged in to leave comments.
Login now