SvnCommit fails in Build file. error MSB6006: "svn.exe" exited with code 1

Hi,
    We have a project wherein we have a middletier subproject and presentation subproject. Now in our build we want that after successful build of middletier subproject, we copy certain .DLL files from middletier project subfolder to presentation subproject folder. I wrote a build script wherein I "SvnCheckout" the middletier project folder, "Copy" the files from middletier subproject folder to presentation subproject folder and finally "SvnCommit" the presentation subproject folder. However, I get a build fail. When I looked into the full error log, I figured out that I get "error MSB6006: "svn.exe" exited with code 1" during SvnCommit.

This is what my SvnCommit looks like:

<!--Commit the checked out folder back to SVN-->
    <SvnCommit Targets="$(WebsiteExternalFolder)"
               ToolPath="C:\Program Files\CollabNet\Subversion Client\"
               UserName=MYUSERNAME"
               Password="MYPASSWORD">      
    </SvnCommit>

As you can see, I mentioned the ToolPath and my credentials too. The strange thing is that I can perform commit from the command like. I have been looking for the solution since days, but could not figure out the solution. I really need help on this.

Thanks,
Abhishek Shrivastava
Web Developer

3 comments

Have you checked the code of SvnCommit? There could be some issue inside.

Does the build script successes if you run it on the same build agent under the same user account from console msbuild?

To debug the issue you at least need to check generated svn.exe commandline and svn error message. You may switch msbuild to diag mode to get
more information on MSBuild building.

0

Thank you Eugene for you quick response. I think I figured it out last night when I ran the script from the command line. Still it wasn't successful, I then realized that the issue was with one of the files that I was committing. It turned out that I was trying to commit "this" file even though it had NO MODIFICATION ! However, I haven't yet figured out if there's a way to commit ONLY those files that are modified, from within the MSBUILD script.Any suggestion on that ? I am using Msbuild Community tasks library @ msbuildtasks.tigris.org. Also to mention, the final code that I used to get SvnCommit successful on other files...(Maybe , this could help other who are experiencing the same issue as mine)

<ItemGroup>
     <WebsiteExternalFolder Include = "[Enter the path to folder/files to be included here]" >
</ItemGroup>

<!--Commit the checked out folder back to SVN-->
     <SvnCommit Targets="@(WebsiteExternalFolder)"
                ToolPath="[Enter the path where SVN client executable is located]"
                UserName=MYUSERNAME"
               Password="MYPASSWORD">      
     </SvnCommit>

Thanks again,
Abhishek

0

I do not know how is SvnCommit task implemented, while to commit all changed file from commandline one may call "snv commit . -m "message" " command. Subversion will check for changed files and commit only changed files. You could probably try calling commit command with recursive option turned on for checkout root directory.

0

Please sign in to leave a comment.