gpg signing extension for hg
the principle is almost the same as how tags work:
.hgsigs stores signatures, localsigs stores local signatures
the format of the signatures is:
nodeid sigversion base64_detached_sig
sigversion 0 signs simply the nodeid (maybe we would like
to sign other things in the future).
you can associate fingerprints with roles in hgrc like:
[gpg]
fingerprint_of_a_key_without_spaces = release
fingerprint_of_a_key_without_spaces = contributor, testing
the key used for signing can be specified on the command line or
via hgrc (key =)
thanks to Eric Hopper for testing and bugfixing
def demandload(scope, modules):
class d:
def __getattr__(self, name):
mod = self.__dict__["mod"]
scope = self.__dict__["scope"]
scope[mod] = __import__(mod, scope, scope, [])
return getattr(scope[mod], name)
for m in modules.split():
dl = d()
dl.mod = m
dl.scope = scope
scope[m] = dl