- the multiple levels of try/catch is a bit scary
I'll see what else I can do about this.
- the checkOut call that fails with a TransferFailedException seems to be called identically after calculating the missing directories. Am I misreading it?
Yes, it's being called again but this time using the base scm url (where the missing directories will be added). The TransferFailedException is the one thrown when the checkout fails because of the missing directory.
- it might be nice to have a block comment that explains what happens (are the directories added in the local checkout, created, remotely, etc? Is it checking out a new base directory higher up to create the directories?)
Ok, I'll add a block comment for what it does.
- also, you want to make sure you don't start creating directories within the original supplied URL - wagon doesn't do that, only create those that it tries to put within that.
That's what the patch does.. it only creates the missing directories where it tried to deploy.
For example: the deployment site url is http://svn.example.com/repos/myproject/www/docs/${project.version} whereas docs/${project.version} does not exist yet, with this patch, what will be created will be starting from the docs directory. Is this what you meant?
Separately - is the test case one that is valid across all the providers? Maybe it can be pushed up to the abstract class?
I'll see if I can move this up to the abstract class as I just based it on the existing test case for ScmSvnExeWagonTest.
The attached patch automatically creates the missing directory/directories when put(...) or putDirectory(...) is executed for wagon-scm. A unit test is also provided.
Can someone kindly review this first before I commit them to SVN? Thanks..