Mercurial > hg
comparison hgext/gpg.py @ 50037: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 | 642e31cb55f0 |
children | 181936ad069a |
comparison
equal
deleted
inserted
replaced
50036:bb6eaa65d12a | 50037:46883d91e2b0 |
---|---|
350 sigsfile = repo.wvfs(b".hgsigs", b"ab") | 350 sigsfile = repo.wvfs(b".hgsigs", b"ab") |
351 sigsfile.write(sigmessage) | 351 sigsfile.write(sigmessage) |
352 sigsfile.close() | 352 sigsfile.close() |
353 | 353 |
354 if b'.hgsigs' not in repo.dirstate: | 354 if b'.hgsigs' not in repo.dirstate: |
355 repo[None].add([b".hgsigs"]) | 355 with repo.dirstate.changing_files(repo): |
356 repo[None].add([b".hgsigs"]) | |
356 | 357 |
357 if opts[b"no_commit"]: | 358 if opts[b"no_commit"]: |
358 return | 359 return |
359 | 360 |
360 message = opts[b'message'] | 361 message = opts[b'message'] |