# SVN module: In check\_mode also check svn.has\_local\_mods()

**URL:** <https://forum.ansible.com/t/svn-module-in-check-mode-also-check-svn-has-local-mods/23362>\
**Category:** Ansible Developer\
**Created:** [January 3, 2017, 1:31pm UTC](https://forum.ansible.com/t/svn-module-in-check-mode-also-check-svn-has-local-mods/23362 "2017-01-03T13:31:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vj.calvo](https://avatars.discourse-cdn.com/v4/letter/v/7993a0/32.png) [@vj.calvo](https://forum.ansible.com/u/vj.calvo)\
**Post date:** [January 3, 2017, 1:31pm UTC](https://forum.ansible.com/t/svn-module-in-check-mode-also-check-svn-has-local-mods/23362/1 "2017-01-03T13:31:27Z")

</div>

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! 🙂

Thanks and regards,

Victor.
