comparison hgext/gpg.py @ 5122:c80af96943aa

refactor options from cmdtable - add extracommitopts for user and date - factor stuff
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Wed, 08 Aug 2007 12:27:20 +0200
parents 30847b8af7ca
children 3aa5c45874c6
comparison
equal deleted inserted replaced
5121:7106f4899aa0 5122:c80af96943aa
4 # 4 #
5 # This software may be used and distributed according to the terms 5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference. 6 # of the GNU General Public License, incorporated herein by reference.
7 7
8 import os, tempfile, binascii 8 import os, tempfile, binascii
9 from mercurial import util 9 from mercurial import util, commands
10 from mercurial import node as hgnode 10 from mercurial import node as hgnode
11 from mercurial.i18n import _ 11 from mercurial.i18n import _
12 12
13 class gpg: 13 class gpg:
14 def __init__(self, path, key=None): 14 def __init__(self, path, key=None):
267 "sign": 267 "sign":
268 (sign, 268 (sign,
269 [('l', 'local', None, _('make the signature local')), 269 [('l', 'local', None, _('make the signature local')),
270 ('f', 'force', None, _('sign even if the sigfile is modified')), 270 ('f', 'force', None, _('sign even if the sigfile is modified')),
271 ('', 'no-commit', None, _('do not commit the sigfile after signing')), 271 ('', 'no-commit', None, _('do not commit the sigfile after signing')),
272 ('k', 'key', '', _('the key id to sign with')),
272 ('m', 'message', '', _('commit message')), 273 ('m', 'message', '', _('commit message')),
273 ('d', 'date', '', _('date code')), 274 ] + commands.commitopts2,
274 ('u', 'user', '', _('user')),
275 ('k', 'key', '', _('the key id to sign with'))],
276 _('hg sign [OPTION]... [REVISION]...')), 275 _('hg sign [OPTION]... [REVISION]...')),
277 "sigcheck": (check, [], _('hg sigcheck REVISION')), 276 "sigcheck": (check, [], _('hg sigcheck REVISION')),
278 "sigs": (sigs, [], _('hg sigs')), 277 "sigs": (sigs, [], _('hg sigs')),
279 } 278 }
280 279