Question

My C# application uses SharpSVN to synchronize local (working copies) and remote (repositories) files. Since I want to synchronize these files while they are processes by other applications, it can be that modified files have active handles at commit time. When I try to commit these files, I receive the following error:

SvnSystemException: "Can't open file 'somefile.ext': File is used by another process"

WindowsErrorCode: ERROR_SHARING_VIOLATION

However when I manually commit them using TortoiseSVN it works.

Was it helpful?

Solution

Meanwhile I found this thread. It seems that SharpSvn doesn't allow that files that are about to be committed are in a writable state.

So, the correct answer to my initial question is: "It's not possible as long as the files are writable". Anyway, in my case the workaround for committing opened files (AutoCAD drawings) is to set them readonly on System level.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top