subversion: export fails if dest directory exists #370
Comments
The default is changed from 'yes' to 'no' to follow subversion behavior (ie, requiring explicit confirmation to erase a existing repository). Since that was not working before cf ansible#370 and since the option was ignored before and unused, this should be safe to change.
This isn't work as expected I'm getting this same error with 1.8.4 I am using the export and force switches from the subversion module but as you will see below force is being outputted but still get the error message, so I'm having to use the shell module and revert back to the svn cli :( TASK: [subversion] ************************************************************ |
@jimsmith Could you open a new issue and include a sample playbook and the error message you're getting? Thanks! |
@jimsmith Actually one other thing you can test before opening a bug -- 1.8.4 doesn't have the fix. The fix involved changing the behaviour of the force parameter so we decided it should wait until 1.9. If you can test with 1.9 or devel then we'll know if there's still a bug lurking. If not, 1.9 will be out shortly. We tagged 1.9rc1 on Tuesday. 1.9rc2 will be out on this coming Tuesday. |
Using the following syntax, the task always fails if /tmp/foo already exists.
- name: (testing) svn export of desired callflow.xml subversion: repo=http://repo.local/repos/target/ dest=/tmp/foo/ export=yes
The error shown is:
msg: ERROR: /tmp/foo/ folder already exists, but its not a subversion repository.
This appears to be happening because the subversion module does not account for exporting if the target directory exists (but is not a working copy):
if not os.path.exists(dest):
...export and checkout both handled
elif os.path.exists("%s/.svn" % (dest, )):
...checkout handled. export presumably not handled because this is a working directory
else: module.fail_json(msg="ERROR: %s folder already exists, but its not a subversion repository." % (dest, ))
I think if we insert another case before the
else
ofelif os.path.exists(dest) and export:
and handle export to a preexisting directory there, it should work.The text was updated successfully, but these errors were encountered: