From 4bd04c299b644cd13d4af05eb61e1c814fd8120f Mon Sep 17 00:00:00 2001 From: Dane Summers Date: Thu, 4 May 2017 13:08:39 -0400 Subject: [PATCH] Fixes #23285 (#24291) Makes subversion module --check fail when modified files are in repository. --- lib/ansible/modules/source_control/subversion.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/modules/source_control/subversion.py b/lib/ansible/modules/source_control/subversion.py index f49b0fc5ac5..7f4db6bc06e 100644 --- a/lib/ansible/modules/source_control/subversion.py +++ b/lib/ansible/modules/source_control/subversion.py @@ -285,6 +285,8 @@ def main(): # positives. Need to switch before revert to ensure we are reverting to # correct repo. if module.check_mode or not update: + if svn.has_local_mods() and not force: + module.fail_json(msg="ERROR: modified files exist in the repository.") check, before, after = svn.needs_update() module.exit_json(changed=check, before=before, after=after) before = svn.get_revision()