Oxygen overrides Subversion

<oXygen/> general issues.
wmaclean
Posts: 24
Joined: Sat Jan 04, 2020 1:17 am

Oxygen overrides Subversion

Post by wmaclean » Tue Jun 16, 2020 5:36 pm

Hello,
We are using Subversion for version control.

We require writers to get a lock on a file in SVN before they make any changes. But, by default, when a user has a file that they do not have an SVN lock on (and it is read-only), Oxygen automatically removes the read-only status of the local file, allowing them to edit a file they do not have a lock on.

Is there a way to change this behavior? We'd like Oxygen to never undo the read-only status of a file.

Thanks,
Will

florin
Posts: 56
Joined: Wed Jan 05, 2011 10:36 am

Re: Oxygen overrides Subversion

Post by florin » Wed Jun 17, 2020 12:02 pm

Hello,

Please let us know the exact steps you do and how you find out that the read-only flag is removed (please also check its existence before doing any operations in Oxygen/SVN Client).
From your message, it is not clear if you use Subversion (SVN) as a technology and Oxygen (the application) changes those flags when you open/edit/save a file, or you want to say that you use the bundled SVN Client and this is the one that generates the issue when performing different SVN-related operations within it.
Florin Avram
<oXygen/> XML Editor

wmaclean
Posts: 24
Joined: Sat Jan 04, 2020 1:17 am

Re: Oxygen overrides Subversion

Post by wmaclean » Wed Jun 17, 2020 9:30 pm

Hello Florin,
We have a separate Tortoise SVN (v1.9.1) and Oxygen (v21).

We are not using the SVN Client bundled with Oxygen. We've been using Tortoise SVN for several years, and are only now adopting Oxygen.

To replicate:

1. In Oxygen Author, select File Open.

2. In the Open dialog, you can see by the gray overlay icons that the file does not have a lock. If you right-click a file and select Properties, you can verify that it is ready-only:
image.png
image.png (154.69 KiB) Viewed 278 times
3. Close Properties, then select the file and click Open. The file is currently untouched, and is still read-only - so I should not be able to edit it.
image.png
image.png (134.63 KiB) Viewed 278 times
4. In the Author tab, place the cursor anywhere in the file, then type - and Oxygen types the new text in the file - it should not be able to do this:
image.png
image.png (134.96 KiB) Viewed 278 times
5. If you again select File > Open in Oxygen, then find the file and right-click on it - I see now it does not change the read-only status. But, it should not have let me write in the file at all.

Is there a way to make Oxygen behave so that it prevents people from modify a file if it is ready only?

Thanks,
Will

Radu
Posts: 7099
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen overrides Subversion

Post by Radu » Thu Jun 18, 2020 7:16 am

Hi Will,

Indeed by default Oxygen lets you make changes to the opened document but it does not let you save back.
If you want to prohibit Oxygen from making changes to the opened document (changes which are not reflected on disk), in the Preferences->"Editor" page you can uncheck the "Can edit read-only files" checkbox.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

wmaclean
Posts: 24
Joined: Sat Jan 04, 2020 1:17 am

Re: Oxygen overrides Subversion

Post by wmaclean » Fri Jun 19, 2020 4:50 pm

Hi Radu,
That works - thanks!

And a colleague of mine also learned about the CAN_EDIT_READ_ONLY_FILES setting in the Workspace, in another post on this site (post58572.html?hilit=vishwa#p58572). Which would've been my next question.

We really appreciate all the help!

Have a good one.
Will

Radu
Posts: 7099
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen overrides Subversion

Post by Radu » Fri Jun 19, 2020 5:56 pm

Hi Will,

I'm glad this works for you. Indeed, a plugin using our APIs can force set this option to prohibit editing read-only files in Oxygen when the application starts.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply