When pushing changes to subversion I was getting a file not found crash within subvertpy. The problem appears to be caused by the path traversal approach used.
If I have the following directory structure:
This is a strange directory stucture because you have a solution file alongside a directory with the same name, but when using Visual Studio and a solution with only one project this is common, and the default configuration.
The problem happens when MyApplication.sln and MyApplication.csproj are both edited in one revision. At line 417 of subvertpy_wrapper.py the paths of modified files are collected together, their parent directories collected and then sorted. However, the sorting order is wrong and causes the visitdir function to fail.
The sorted order is:
[ 'MyApplication', 'MyApplication/MyApplication', 'MyApplication/MyApplication.sln', 'MyApplication/MyApplication/MyApplication.csproj' ]
This means that the Directory Editor for MyApplication is active and then moves to the Directory Editor for MyApplication/MyApplication.
The next visitdir looks at MyApplication/MyApplication.sln and because it is not within MyApplication/MyApplication it returns with the index to MyApplication.
Then MyApplication/MyApplication/MyApplication.csproj is looked at in the context of the MyApplication Directory Editor, which is one level up from where it should be.
This then causes svn to try to open the file ...svn/MyApplication/MyApplication.csproj instead of svn/MyApplication/MyApplication/MyApplication.csproj.
The problem seems to stem from the sorted function putting '/' after '.' in its sort. The correct sort should be:
[ 'MyApplication', 'MyApplication/MyApplication', 'MyApplication/MyApplication/MyApplication.csproj', 'MyApplication/MyApplication.sln' ]
but I imagine that there are likely to be other quirks too.
My config: Windows 7 Professional. Hg 4.0.1, SVN 1.9.5