##// END OF EJS Templates
gpg: use a context manager to write `.hgsigs`
Matt Harbison -
r51771:bbaac3a2 default
parent child Browse files
Show More
@@ -348,9 +348,8 b' def _dosign(ui, repo, *revs, **opts):'
348 hint=_(b"please commit .hgsigs manually"),
348 hint=_(b"please commit .hgsigs manually"),
349 )
349 )
350
350
351 sigsfile = repo.wvfs(b".hgsigs", b"ab")
351 with repo.wvfs(b".hgsigs", b"ab") as sigsfile:
352 sigsfile.write(sigmessage)
352 sigsfile.write(sigmessage)
353 sigsfile.close()
354
353
355 if b'.hgsigs' not in repo.dirstate:
354 if b'.hgsigs' not in repo.dirstate:
356 with repo.dirstate.changing_files(repo):
355 with repo.dirstate.changing_files(repo):
General Comments 0
You need to be logged in to leave comments. Login now