Skip to content
Snippets Groups Projects
Commit b09a0afc authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

keyword: wrap dirstate mutation in `changing_files` context

This is the way.
parent 03decaaf
No related branches found
No related tags found
2 merge requests!485branching: merge default into stable,!457dirstate-scoping [18] : scope the rest of the operation
......@@ -437,8 +437,8 @@
if len(wctx.parents()) > 1:
raise error.Abort(_(b'outstanding uncommitted merge'))
kwt = getattr(repo, '_keywordkwt', None)
with repo.wlock():
with repo.wlock(), repo.dirstate.changing_files(repo):
status = _status(ui, repo, wctx, kwt, *pats, **opts)
if status.modified or status.added or status.removed or status.deleted:
raise error.Abort(_(b'outstanding uncommitted changes'))
kwt.overwrite(wctx, status.clean, True, expand)
......@@ -441,8 +441,7 @@
status = _status(ui, repo, wctx, kwt, *pats, **opts)
if status.modified or status.added or status.removed or status.deleted:
raise error.Abort(_(b'outstanding uncommitted changes'))
kwt.overwrite(wctx, status.clean, True, expand)
repo.dirstate.write(repo.currenttransaction())
@command(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment