hgext/keyword.py
changeset 50150 b09a0afcb975
parent 50041 1346db77e14d
child 50258 dba3593555e5
--- a/hgext/keyword.py	Tue Feb 21 23:10:02 2023 +0100
+++ b/hgext/keyword.py	Wed Feb 22 03:34:48 2023 +0100
@@ -437,12 +437,11 @@
     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)
-        repo.dirstate.write(repo.currenttransaction())
 
 
 @command(