Locked file - computer name and path?

36 views
Skip to first unread message

Andreas Nilsson

unread,
May 6, 2024, 5:08:29 AMMay 6
to TortoiseSVN
When I try to lock a file, Tortoisesvn says it is already locked. It gives me user and filesystem number. 

The filesystem number does not help me. I would like to know where the lock is, like the computer name and path of the locked file. 

Is there a way to do this?

B.R.
Andreas

Daniel Sahlberg

unread,
May 6, 2024, 5:21:09 AMMay 6
to TortoiseSVN
The information about computer name and path is not available on the server so anything has to be done client side.

The best way is to add a clientside Pre-Lock Hook script. There is a sample script in the TortoiseSVN repository:


Kind regards,
Daniel
 

Pavel Lyalyakin

unread,
May 6, 2024, 5:40:09 AMMay 6
to TortoiseSVN
If you want to unlock the file which was locked by someone else, then you can break or steal the lock from the context menu in the Check for modifications window. An administrator can also break the lock on the server side using `svnadmin rmlocks`.

[[[
If one of your co-workers acquires a lock and then goes on holiday without releasing it, what do you do? Subversion provides a means to force locks. Releasing a lock held by someone else is referred to as Breaking the lock, and forcibly acquiring a lock which someone else already holds is referred to as Stealing the lock. Naturally these are not things you should do lightly if you want to remain friends with your co-workers.
]]]

--
With best regards,
Pavel Lyalyakin
VisualSVN Team

Andreas Nilsson

unread,
May 8, 2024, 8:44:47 AMMay 8
to TortoiseSVN
Thank you very much!

A Pre-lock hook script is a clever way. I'll keep that in mind. However, for now I'll try to keep track in my head of the three computers where I have working copies :)

B.r.
Andreas
Reply all
Reply to author
Forward
0 new messages