hgkw/keyword.py
changeset 262 397a5957cc48
parent 261 28e64bebc298
child 263 fc7f60b109b6
equal deleted inserted replaced
261:28e64bebc298 262:397a5957cc48
   312 def _overwrite(ui, repo, files, expand):
   312 def _overwrite(ui, repo, files, expand):
   313     '''Expands/shrinks keywords in working directory.'''
   313     '''Expands/shrinks keywords in working directory.'''
   314     if not hasattr(ui, 'kwfmatcher'):
   314     if not hasattr(ui, 'kwfmatcher'):
   315         ui.warn(_('no files configured for keyword expansion\n'))
   315         ui.warn(_('no files configured for keyword expansion\n'))
   316         return
   316         return
       
   317     bail_if_changed(repo)
   317     wlock = lock = None
   318     wlock = lock = None
   318     try:
   319     try:
   319         wlock = repo.wlock()
   320         wlock = repo.wlock()
   320         lock = repo.lock()
   321         lock = repo.lock()
   321         bail_if_changed(repo)
       
   322         ctx = repo.changectx()
   322         ctx = repo.changectx()
   323         man = ctx.manifest()
   323         man = ctx.manifest()
   324         if files:
   324         if files:
   325             cwd = repo.getcwd()
   325             cwd = repo.getcwd()
   326             files = [util.canonpath(repo.root, cwd, f) for f in files]
   326             files = [util.canonpath(repo.root, cwd, f) for f in files]