Mercurial > hg-stable
changeset 45936:777e8d88f703
commands: fix checking of share safe requirement on `config --shared`
The `if requirements.SHARESAFE_REQUIREMENT in ...` was wrongly placed inside
another if statement which made the check unreachable.
Differential Revision: https://phab.mercurial-scm.org/D9360
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 21 Nov 2020 13:30:50 +0530 |
parents | 1441f4d57083 |
children | 37bcd7f5a543 |
files | mercurial/commands.py |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Fri Nov 20 14:34:15 2020 +0530 +++ b/mercurial/commands.py Sat Nov 21 13:30:50 2020 +0530 @@ -2227,13 +2227,13 @@ raise error.InputError( _(b"repository is not shared; can't use --shared") ) - if requirements.SHARESAFE_REQUIREMENT not in repo.requirements: - raise error.InputError( - _( - b"share safe feature not unabled; " - b"unable to edit shared source repository config" - ) + if requirements.SHARESAFE_REQUIREMENT not in repo.requirements: + raise error.InputError( + _( + b"share safe feature not enabled; " + b"unable to edit shared source repository config" ) + ) paths = [vfsmod.vfs(repo.sharedpath).join(b'hgrc')] elif opts.get(b'non_shared'): paths = [repo.vfs.join(b'hgrc-not-shared')]