##// END OF EJS Templates
gpg: make sign acquire wlock before processing...
FUJIWARA Katsunori -
r27196:7b4a6157 default
parent child Browse files
Show More
@@ -9,6 +9,7 b' import os, tempfile, binascii'
9 from mercurial import util, commands, match, cmdutil, error
9 from mercurial import util, commands, match, cmdutil, error
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 from mercurial import lock as lockmod
12
13
13 cmdtable = {}
14 cmdtable = {}
14 command = cmdutil.command(cmdtable)
15 command = cmdutil.command(cmdtable)
@@ -222,7 +223,14 b' def sign(ui, repo, *revs, **opts):'
222
223
223 See :hg:`help dates` for a list of formats valid for -d/--date.
224 See :hg:`help dates` for a list of formats valid for -d/--date.
224 """
225 """
226 wlock = None
227 try:
228 wlock = repo.wlock()
229 return _dosign(ui, repo, *revs, **opts)
230 finally:
231 lockmod.release(wlock)
225
232
233 def _dosign(ui, repo, *revs, **opts):
226 mygpg = newgpg(ui, **opts)
234 mygpg = newgpg(ui, **opts)
227 sigver = "0"
235 sigver = "0"
228 sigmessage = ""
236 sigmessage = ""
General Comments 0
You need to be logged in to leave comments. Login now