changeset 50093:46883d91e2b0

dirstate: use `dirstate.change_files` to scope the change in `gpg` This is the way.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 25 Jan 2023 12:46:22 +0100
parents bb6eaa65d12a
children 6cdcab3ae3fa
files hgext/gpg.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/gpg.py	Tue Dec 13 16:57:41 2022 +0100
+++ b/hgext/gpg.py	Wed Jan 25 12:46:22 2023 +0100
@@ -352,7 +352,8 @@
     sigsfile.close()
 
     if b'.hgsigs' not in repo.dirstate:
-        repo[None].add([b".hgsigs"])
+        with repo.dirstate.changing_files(repo):
+            repo[None].add([b".hgsigs"])
 
     if opts[b"no_commit"]:
         return