##// END OF EJS Templates
gpg: move test of force before status call
Matt Mackall -
r22682:9c89ac99 default
parent child Browse files
Show More
@@ -253,12 +253,12 b' def sign(ui, repo, *revs, **opts):'
253 repo.opener.append("localsigs", sigmessage)
253 repo.opener.append("localsigs", sigmessage)
254 return
254 return
255
255
256 msigs = match.exact(repo.root, '', ['.hgsigs'])
256 if not opts["force"]:
257 s = repo.status(match=msigs, unknown=True, ignored=True)
257 msigs = match.exact(repo.root, '', ['.hgsigs'])
258 if util.any(s) and not opts["force"]:
258 if util.any(repo.status(match=msigs, unknown=True, ignored=True)):
259 raise util.Abort(_("working copy of .hgsigs is changed "
259 raise util.Abort(_("working copy of .hgsigs is changed "
260 "(please commit .hgsigs manually "
260 "(please commit .hgsigs manually "
261 "or use --force)"))
261 "or use --force)"))
262
262
263 sigsfile = repo.wfile(".hgsigs", "ab")
263 sigsfile = repo.wfile(".hgsigs", "ab")
264 sigsfile.write(sigmessage)
264 sigsfile.write(sigmessage)
General Comments 0
You need to be logged in to leave comments. Login now