I know how to configure the Mercurial signing extension. The problem that I’m having is that I don’t want to sign each individual change set, I only want to sign revisions that introduce new version tags.
That’s easily accomplished locally, however I can’t come up with a way to enforce this on the remote server. I’d like people to continue to be able to push their changes as normal, unless adding a release tag, which should be accompanied by a signature.
The end result should be that anyone cloning our repository can easily see a list of signed revisions, which point to a list of signed releases.
Hopefully, I’ve just missed something obvious in hooklib. Has anyone else accomplished this, if so, how?
You could do it on the server with a
pretxnchangegrouphook. More efficient in-process in python, but off the top of my head in shell you’d do:In your hgrc:
and in all-tags-checked.sh:
That goes through every new changeset and checks to make sure that if it edits .hgtags (add a tag) then it must also be signed.
Is that what you’re looking for?