# HG changeset patch # User Pierre-Yves David # Date 2023-01-25 11:46:22 # Node ID 46883d91e2b0107ca11074e1faec5b3385c8f25a # Parent bb6eaa65d12a980961392018e1881cee37b7308a dirstate: use `dirstate.change_files` to scope the change in `gpg` This is the way. diff --git a/hgext/gpg.py b/hgext/gpg.py --- a/hgext/gpg.py +++ b/hgext/gpg.py @@ -352,7 +352,8 @@ def _dosign(ui, repo, *revs, **opts): 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