Alexander Kitaev wrote:
> I'm working on the pure Java Subversion client library (JavaSVN). Recently
> one of the users reported an exception that states that JavaSVN was not able
> to rename .svn/tmp/entries to .svn/entries.
>
> This rename operation is performed every time "entries" file is saved and
> same approach with temorary file is used in the command line Subversion
> client. First contents is saved to .svn/tmp/entries and then
> .svn/tmp/entries is atomically renamed to .svn/entries. AFAIU, this may fail
> in case .svn/entries is locked by some other program that reads from that
> file or writes to it.
>
> User reported that he runs TortoiseSVN and has TSVNCache.exe program running
> and I think that ot could lock "entries" file and thus prevent renaming.
> User's application performs addition of several thousands files and problem
> is hardly reproducable, but sometimes it appears. User's OS is Windows XP.
>
> User's version of TSVN is 1.2.1, build 3895. The latest version available is
> 1.2.2, build 4295. What I would like to ask is whether upgrading to the
> newer version could solve that problem or should I instead modify JavaSVN to
> handle failed renames (i.e. wait for 100ms and try to rename the file
> again)?
TSVN (and TSVNCache) doesn't lock those files itself. It uses the
Subversion library for calls to svn_client_status2() - and that function
can 'lock' those files for a short period of time. But AFAIK, that
function only opens the files with SHARE_READ access, so you should be
at least able to read those files.
Another issue might be a running virus scanner. We've known this kind of
problem for a long time now: some virus scanners lock Subversions own
files and then Subversion operations can fail because of locked files.
I'd suggest you try the same approach as Subversion: open the file. If
it fails (because another process has the file open) wait a little
while, then try again. Subversion tries to open its files 200 times
before it gives up.
Another thing: please, if you write a message to this list, don't just
reply to another message! That messes up the message threads. And at
least, don't quote that message you're replying to!! The message you
replied to has absolutely *nothing* to do with what you just wrote, and
there's absolutely *no* need to quote that mail.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Mon Sep 19 19:58:47 2005