Staging instance, all changes can be removed at any time

Skip to content

svn: Prefer to svn cleanup path instead of removing it before checkout

In production, we have errors reporting that path is already locked or that the working copy cannot be locked when attempting to perform a checkout operation.

For some reasons, it seems that attempting to remove the checkout path before that operation is not sufficient for some cases.

So prefer to svn cleanup the working copy to ensure remaining locks will be removed, checkout operation can then be safely retried.

Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from subvertpy import SubversionException, client, properties
>>> from subvertpy.ra import Auth, RemoteAccess, get_username_provider
>>> auth = Auth([get_username_provider()])
>>> client = client.Client(auth=auth)
>>> client.checkout("http://svn.code.sf.net/p/tacklebar/tacklebar", "toto", 356)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
subvertpy.SubversionException: ("Working copy '/tmp/toto' locked.", 155004)
>>> from subvertpy import wc
>>> wc.cleanup("toto")
>>> client.checkout("http://svn.code.sf.net/p/tacklebar/tacklebar", "toto", 356)
>>>

Should fix errors of type <path> is already locked via <path> and Failed to lock working copy <path> in SWH-LOADER-SVN-7C.


Migrated from D7557 (view on Phabricator)

Merge request reports

Loading