##// END OF EJS Templates
keyword: wrap dirstate mutation in `changing_files` context...
marmoute -
r51045:b09a0afc default
parent child Browse files
Show More
@@ -437,12 +437,11 b' def _kwfwrite(ui, repo, expand, *pats, *'
437 if len(wctx.parents()) > 1:
437 if len(wctx.parents()) > 1:
438 raise error.Abort(_(b'outstanding uncommitted merge'))
438 raise error.Abort(_(b'outstanding uncommitted merge'))
439 kwt = getattr(repo, '_keywordkwt', None)
439 kwt = getattr(repo, '_keywordkwt', None)
440 with repo.wlock():
440 with repo.wlock(), repo.dirstate.changing_files(repo):
441 status = _status(ui, repo, wctx, kwt, *pats, **opts)
441 status = _status(ui, repo, wctx, kwt, *pats, **opts)
442 if status.modified or status.added or status.removed or status.deleted:
442 if status.modified or status.added or status.removed or status.deleted:
443 raise error.Abort(_(b'outstanding uncommitted changes'))
443 raise error.Abort(_(b'outstanding uncommitted changes'))
444 kwt.overwrite(wctx, status.clean, True, expand)
444 kwt.overwrite(wctx, status.clean, True, expand)
445 repo.dirstate.write(repo.currenttransaction())
446
445
447
446
448 @command(
447 @command(
General Comments 0
You need to be logged in to leave comments. Login now