Cannot delete working copies.
EasySVN (daemon or even the shell extension) keeps any
working copy open as soon as the context menu is being
opened. As a result, the user can no longer delete any
working copy using the explorer.
Please investigate what access causes the lock and fix
it if possible (possibly a pool cleanup issue).
working copy open as soon as the context menu is being
opened. As a result, the user can no longer delete any
working copy using the explorer.
Please investigate what access causes the lock and fix
it if possible (possibly a pool cleanup issue).
Leave a comment
on 2012-01-29 02:32 *
By Cristian Amarie
Cannot reproduce on Windows 7 x64. I was able to invoke SVN Delete command on files, directories, and explorer delete command as well. All carried out succesfully.
Can you tell me on which environment I can retry to do this?
- Operating system and explorer settings (mainly open in a separate process, I suppose)
- what kind of delete operation do I have to try (SVN delete, delete from explorer)
- directory/repository where the operation occurred is watched or not (parent directory, or directory itself)
Can you tell me on which environment I can retry to do this?
- Operating system and explorer settings (mainly open in a separate process, I suppose)
- what kind of delete operation do I have to try (SVN delete, delete from explorer)
- directory/repository where the operation occurred is watched or not (parent directory, or directory itself)
on 2012-01-29 02:40 *
By Cristian Amarie
It seems that the operation that can't be performed is directory deletion when directory is a watched working copy. Please confirm me that this is the scenario, thanks.
on 2012-01-29 11:53 *
By Cristian Amarie
It is the daemon that locks the directory. ReadDirectoryChangesW or a cached handle kept prevents the handle from closing. Continuing to investigate this.
on 2012-01-29 16:01 *
By Cristian Amarie
I think I have tracked down the problem - I think are the svn_client_info3 and/or svn_client_status5 calls which keeps not the directory itself (which have share RWD allowed), but the wc.db file remains opened, most likely the context cleanup is not executed until program termination (that would be the most likely cause until now, or perhaps concurrent calls, I am not yet sure).
Fact is, executing Handle.exe just after daemon startup without doing any context menu produces:
$C:\bin\handle fpsro | find /V "TSVNCache" | find /V "Handle v" | find /V "Copyright " | find /V "Sysinternals -"
...
Daemon.exe pid: 3800 ndesktop-08\cristian
1E8: File (RWD) C:\dev\assembla.com\tmp2\fpsro-nu-02-private
304: File (RW-) C:\dev\assembla.com\tmp2\fpsro-nu-02-private\.svn\wc.db
4CC: File (RW-) C:\dev\assembla.com\tmp2\fpsro-nu-02-private\.svn\wc.db
...
and this indicates (FILE_SHARE_DELETE flag is missing from wc.db file handles) that directory is not deletable.
Continuing debugging using TSVN/Subversion source code to track down the problem.
Fact is, executing Handle.exe just after daemon startup without doing any context menu produces:
$C:\bin\handle fpsro | find /V "TSVNCache" | find /V "Handle v" | find /V "Copyright " | find /V "Sysinternals -"
...
Daemon.exe pid: 3800 ndesktop-08\cristian
1E8: File (RWD) C:\dev\assembla.com\tmp2\fpsro-nu-02-private
304: File (RW-) C:\dev\assembla.com\tmp2\fpsro-nu-02-private\.svn\wc.db
4CC: File (RW-) C:\dev\assembla.com\tmp2\fpsro-nu-02-private\.svn\wc.db
...
and this indicates (FILE_SHARE_DELETE flag is missing from wc.db file handles) that directory is not deletable.
Continuing debugging using TSVN/Subversion source code to track down the problem.
on 2012-01-30 15:28 *
By Cristian Amarie
started working on a solution involving immediately (forced?) cleanup which will invoke SDB close
on 2012-02-05 03:07 *
By Cristian Amarie
use a locally declared context object for svn client operations that may lock the database (info, status, add, delete, commit)
on 2012-02-05 03:08 *
By Cristian Amarie
Assigned to changed from Cristian Amarie to stefan.fuhrmann.1974
Status changed from New to Test
Stefan, I think now is solved. Please take a look on changes r804+805.
on 2012-02-06 15:02 *
By Cristian Amarie
Perfect. Then I suppose the ticket can be closed.
If Stefan can take a closer look in code to make sure I didn't overlooked something will be a double check for me.
If Stefan can take a closer look in code to make sure I didn't overlooked something will be a double check for me.
on 2012-02-07 17:11 *
By stefan.fuhrmann.1974
Assigned to changed from stefan.fuhrmann.1974 to Cristian Amarie
I implemented a new interface method "ReleaseWorkingCopy". This will re-use configuration file and authentication information. Caution: the code has not been tested.
Could you change your patch to call the new method instead of creating temporary context objects?
Could you change your patch to call the new method instead of creating temporary context objects?
on 2012-02-08 02:37 *
By Cristian Amarie
I will checking the new release support function and usage; will reassign to you for check after patch is done.
on 2012-02-11 08:47 *
By Cristian Amarie
revision 838
Removed usage of local context (to ensure svn database cleanup) and use the existing context; call ReleaseWorkingCopy after svn_client_... calls.
Tested with Share, Checkout, Checkout from Assembla - in all cases the repository directory can be deleted and wc.db file does not remain locked (it is locked for the moment of svn client calls and then released).
Removed usage of local context (to ensure svn database cleanup) and use the existing context; call ReleaseWorkingCopy after svn_client_... calls.
Tested with Share, Checkout, Checkout from Assembla - in all cases the repository directory can be deleted and wc.db file does not remain locked (it is locked for the moment of svn client calls and then released).
on 2012-02-11 08:48 *
By Cristian Amarie
Assigned to changed from Cristian Amarie to a_smirn
Status changed from Accepted to Test
Reassigning for testing: please do a quick test (checkout from assembla, activation, then delete the directory to ensure does not remain locked).