Mercurial > hg
changeset 22682:9c89ac99690e
gpg: move test of force before status call
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 02 Oct 2014 18:47:02 -0500 |
parents | 80b6919eb199 |
children | f1872fdc1c3c |
files | hgext/gpg.py |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/gpg.py Wed Sep 24 12:57:39 2014 -0700 +++ b/hgext/gpg.py Thu Oct 02 18:47:02 2014 -0500 @@ -253,12 +253,12 @@ repo.opener.append("localsigs", sigmessage) return - msigs = match.exact(repo.root, '', ['.hgsigs']) - s = repo.status(match=msigs, unknown=True, ignored=True) - if util.any(s) and not opts["force"]: - raise util.Abort(_("working copy of .hgsigs is changed " - "(please commit .hgsigs manually " - "or use --force)")) + if not opts["force"]: + msigs = match.exact(repo.root, '', ['.hgsigs']) + if util.any(repo.status(match=msigs, unknown=True, ignored=True)): + raise util.Abort(_("working copy of .hgsigs is changed " + "(please commit .hgsigs manually " + "or use --force)")) sigsfile = repo.wfile(".hgsigs", "ab") sigsfile.write(sigmessage)