Chef Subversion Resource Fails

I’ve had the subversion resource working just fine for several months.  I made some changes in subversion such as moving a file from one location to another.  I updated the attributes in chef to reflect the new location, but the svn client on this centos server reported an error.

I was able to get the actual svn command by running chef-client -l debug (in debug mode).

svn export –force –trust-server-cert –onon-interactive -q –username abc –password abcd -r5 /sites/dxr-bootstrap.xml

The error was:

svn: File not found:  revision 1, path /client-files/dev/standalone/dxr-bootstrap.xml

Notice that the path of the error does not match the path used in the command.  I was able to duplicate the error on the command line by pasting the command on the command line.

When I removed the “-r5” the command worked fine.  But, the chef subversion resource adds that automatically.

Eventually, I opened the dxr-bootstrap.xml file on my local workstation, made a trivial change and checked it back in.

That fixed it temporarily.  The next time someone made a revision in the repo, it started getting the error again.

I remembered that I had done a rename on the standalone directory to a new name.  It looked like the history had some unresolved reference to the old name.

To resolve the issue, I deleted the directory tree from the repo, checked that in, then re-added the entire tree fresh and committed it.  That removed whatever history was causing the issue and it’s working now.

It seems that doing a TortoiseSVN rename on a directory may leave some hanging issues in the repo.