bigpan
bigpan

Reputation: 419

svn cleanup failed because pristine file could not be moved

I wanted to use svn cleanup to remove lock on my working copy but failed with the following log:

svn: E000001: Can't remove file '/Users/panjie/Desktop/work/SYS-SVN/.svn/pristine/e4/e41bbcb7a645255ae62c65613e6d0dcbe7499d70.svn-base': Operation not permitted

I checked the permission of the file and found nothing wrong. I am using SVN/1.9.3 under MACOSX/10.11.6

Upvotes: 6

Views: 3889

Answers (2)

Alexandro Nadal
Alexandro Nadal

Reputation: 102

If someone is using Linux and has the same problem, just run:

chown <user>:<group> -R .svn

Essentially the issue is incorrect permissions in svn, most likely somebody commited with root permissions. If you do not your group, most likely using the same name as your linux user will work. If this does not work either, check the file permissions with chmod and not the ownership of the files.

Upvotes: 1

bigpan
bigpan

Reputation: 419

The cause of this is that the file is locked by macOS. So, the solution is simple chflags -R nouchg .svn and run svn cleanup again and everything is OK now.

Upvotes: 15

Related Questions