##// END OF EJS Templates
gpg: fix an UnboundLocalError whenever using --force...
Matt Harbison -
r51715:181936ad stable
parent child Browse files
Show More
@@ -339,8 +339,9 b' def _dosign(ui, repo, *revs, **opts):'
339 repo.vfs.append(b"localsigs", sigmessage)
339 repo.vfs.append(b"localsigs", sigmessage)
340 return
340 return
341
341
342 msigs = match.exact([b'.hgsigs'])
343
342 if not opts[b"force"]:
344 if not opts[b"force"]:
343 msigs = match.exact([b'.hgsigs'])
344 if any(repo.status(match=msigs, unknown=True, ignored=True)):
345 if any(repo.status(match=msigs, unknown=True, ignored=True)):
345 raise error.Abort(
346 raise error.Abort(
346 _(b"working copy of .hgsigs is changed "),
347 _(b"working copy of .hgsigs is changed "),
@@ -54,4 +54,21 b' and migrate secret keys'
54 e63c23eaa88a is signed by:
54 e63c23eaa88a is signed by:
55 hgtest
55 hgtest
56
56
57 The signature is different each time, so avoid signing the previous signature so
58 that the cset hashes are unchanging.
59 $ hg up -q '.^'
60
61 $ HGEDITOR=cat hg sign -f -e .
62 gpg: error retrieving key fingerprint from card: Invalid name (?)
63 signing 0:e63c23eaa88a
64 Added signature for changeset e63c23eaa88a
65
66
67 HG: Enter commit message. Lines beginning with 'HG:' are removed.
68 HG: Leave message empty to abort commit.
69 HG: --
70 HG: user: test
71 HG: branch 'default'
72 HG: added .hgsigs
73
57 $ cd ..
74 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now