##// END OF EJS Templates
keyword: use _keywordkwt of repository instead of kwtools['templater']...
FUJIWARA Katsunori -
r33070:735218be default
parent child Browse files
Show More
@@ -165,7 +165,7 b' def svnutcdate(text):'
165 return util.datestr((util.parsedate(text)[0], 0), '%Y-%m-%d %H:%M:%SZ')
165 return util.datestr((util.parsedate(text)[0], 0), '%Y-%m-%d %H:%M:%SZ')
166
166
167 # make keyword tools accessible
167 # make keyword tools accessible
168 kwtools = {'templater': None, 'hgcmd': ''}
168 kwtools = {'hgcmd': ''}
169
169
170 def _defaultkwmaps(ui):
170 def _defaultkwmaps(ui):
171 '''Returns default keywordmaps according to keywordset configuration.'''
171 '''Returns default keywordmaps according to keywordset configuration.'''
@@ -385,7 +385,7 b' def _kwfwrite(ui, repo, expand, *pats, *'
385 wctx = repo[None]
385 wctx = repo[None]
386 if len(wctx.parents()) > 1:
386 if len(wctx.parents()) > 1:
387 raise error.Abort(_('outstanding uncommitted merge'))
387 raise error.Abort(_('outstanding uncommitted merge'))
388 kwt = kwtools['templater']
388 kwt = getattr(repo, '_keywordkwt', None)
389 with repo.wlock():
389 with repo.wlock():
390 status = _status(ui, repo, wctx, kwt, *pats, **opts)
390 status = _status(ui, repo, wctx, kwt, *pats, **opts)
391 if status.modified or status.added or status.removed or status.deleted:
391 if status.modified or status.added or status.removed or status.deleted:
@@ -529,7 +529,7 b' def files(ui, repo, *pats, **opts):'
529 I = ignored
529 I = ignored
530 i = ignored (not tracked)
530 i = ignored (not tracked)
531 '''
531 '''
532 kwt = kwtools['templater']
532 kwt = getattr(repo, '_keywordkwt', None)
533 wctx = repo[None]
533 wctx = repo[None]
534 status = _status(ui, repo, wctx, kwt, *pats, **opts)
534 status = _status(ui, repo, wctx, kwt, *pats, **opts)
535 if pats:
535 if pats:
@@ -614,7 +614,7 b' def reposetup(ui, repo):'
614 if not inc:
614 if not inc:
615 return
615 return
616
616
617 kwtools['templater'] = kwt = kwtemplater(ui, repo, inc, exc)
617 kwt = kwtemplater(ui, repo, inc, exc)
618
618
619 class kwrepo(repo.__class__):
619 class kwrepo(repo.__class__):
620 def file(self, f):
620 def file(self, f):
General Comments 0
You need to be logged in to leave comments. Login now