hgkw/keyword.py
branchstable
changeset 449 78a819b57dcc
parent 448 6c06944ba344
child 451 78796cd3e7d0
equal deleted inserted replaced
448:6c06944ba344 449:78a819b57dcc
   256 def _status(ui, repo, kwt, *pats, **opts):
   256 def _status(ui, repo, kwt, *pats, **opts):
   257     '''Bails out if [keyword] configuration is not active.
   257     '''Bails out if [keyword] configuration is not active.
   258     Returns status of working directory.'''
   258     Returns status of working directory.'''
   259     if kwt:
   259     if kwt:
   260         matcher = cmdutil.match(repo, pats, opts)
   260         matcher = cmdutil.match(repo, pats, opts)
   261         return repo.status(files=matcher.files(), match=matcher, list_clean=True)
   261         return repo.status(match=matcher, list_clean=True)
   262     if ui.configitems('keyword'):
   262     if ui.configitems('keyword'):
   263         raise util.Abort(_('[keyword] patterns cannot match'))
   263         raise util.Abort(_('[keyword] patterns cannot match'))
   264     raise util.Abort(_('no [keyword] patterns configured'))
   264     raise util.Abort(_('no [keyword] patterns configured'))
   265 
   265 
   266 def _kwfwrite(ui, repo, expand, *pats, **opts):
   266 def _kwfwrite(ui, repo, expand, *pats, **opts):
   456         def wread(self, filename):
   456         def wread(self, filename):
   457             data = super(kwrepo, self).wread(filename)
   457             data = super(kwrepo, self).wread(filename)
   458             return kwt.wread(filename, data)
   458             return kwt.wread(filename, data)
   459 
   459 
   460         def commit(self, files=None, text='', user=None, date=None,
   460         def commit(self, files=None, text='', user=None, date=None,
   461                    match=util.always, force=False, force_editor=False,
   461                    match=None, force=False, force_editor=False,
   462                    p1=None, p2=None, extra={}, empty_ok=False):
   462                    p1=None, p2=None, extra={}, empty_ok=False):
   463             wlock = lock = None
   463             wlock = lock = None
   464             _p1 = _p2 = None
   464             _p1 = _p2 = None
   465             try:
   465             try:
   466                 wlock = self.wlock()
   466                 wlock = self.wlock()