LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW File Permissions Error (8) when trying to delete a .SVN checkout directory

This one has me stumped...

Our test platform: Windows XP SP2, LabVIEW 8.2.1, TortoiseSVN client 1.45 Build 10425

We would like to delete our checkout folder and download a clean version from our SVN server using LabVIEW.

When we try and delete the folder using the standard LabVIEW Delete VI (see attached snap) we always receive Error 8 - LabVIEW:  File permission error. You do not have the correct permissions for the file. This is interesting because I've checked the entire directory hierarchy and I'm the sole owner under Windows XP - I'm also our domain admin.

In an effort to debug this further, we removed the contents of the directory, apart from the hidden .svn. We checked the .svn tree for any outstanding files and removed them. We then re-ran the LabVIEW code to delete the dir. Still no joy. We then looked at the Windows dialog for the attributes of the checkout folder. It appear that the folder has read-onlly attributes - with a greyed-out tick in the checkbox. Also trying to delete the folder under the Windows command line doesn't work either. It only seems to work when you delete the folder through the Windows GUI.

Any thoughts anyone?

-Chroma



0 Kudos
Message 1 of 10
(5,196 Views)
Could you back up a bit and say a bit about what you are trying to actually accomplish? Why are you trying to delete the svn directory? That will remove the directory from source control. If all you want is a clean copy from the repository all you have to do is remove everything but the hidden svn directory and do an update. Any missing files will be recreated.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 10
(5,172 Views)
If you need a clean version for sending it to someone else you can use the export command.of SVN. Use the force and quiet parameters to automatically create all files and suppress the messages. Use an empty folder as target to avoid old versions to be there.
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 3 of 10
(5,159 Views)
Regardless of the good advice already given, the answer to the original question is that you can't delete a read-only file. You need to change its attributes first and the bits are described in the online help for the primitive that reads and writes the attributes. OpenG has a Delete Recursive VI which already does this, if you want.

As a side issue, you might wish to use _svn directories instead of .svn in your client, since it has some advantages when working with LabVIEW.

___________________
Try to take over the world!
0 Kudos
Message 4 of 10
(5,151 Views)
Hey tst!

What advantage is there to using the _svn option with LV?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 10
(5,139 Views)
LabVIEW ignores files and folders beginning with an underscore when performing certain operations. The only one I can think of currently is scanning directories for inclusion in the palettes, so if your user.lib VIs are under source control, you don't get a .svn icon in every palette. I'm not sure if there are any others (I know that a mass compile does not ignore them).

___________________
Try to take over the world!
0 Kudos
Message 6 of 10
(5,128 Views)
Excellent! I'll check it out. Thanks.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 7 of 10
(5,123 Views)
By the way - to change this, you need to delete all your working copies, change the setting and then check them all out again, since the setting is global for the client.

___________________
Try to take over the world!
0 Kudos
Message 8 of 10
(5,118 Views)
LabVIEW has the nasy habit of locking a directory where it opened a file in or just browsed.
Maybe this bug is biting you

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 9 of 10
(5,111 Views)
Thanks guys - great feedback!

Tst - I remember you mentioning that one about the underscore previously.

Regards,
Chroma
0 Kudos
Message 10 of 10
(5,084 Views)