SVN module: In check_mode also check svn.has_local_mods()

Hello,

For our deployment purposes using Ansible and SVN we would need to test (check mode, dry-run) before run the deployment playbook. If there is some missing file in the destination it will pass the check-mode but not the definitive one.

I looked at the code and I think it will do the job to add in current line 286:

if module.check_mode or not update:

if (svn.has_local_mods() && !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)

I am far from an expert on this, so I prefer to post it here so maybe someone can help and implement it! :slight_smile:

Thanks and regards,

Victor.