Visual Studio Interface read-only handling defect

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
robe070
Posts: 176
Joined: Wed Feb 06, 2008 7:42 pm

Visual Studio Interface read-only handling defect

Post by robe070 » Tue Mar 16, 2010 6:06 pm

In 4.1.3 when offline, but bound to Vault, a read-only file was editable and when you built a solution, it wrote it to the disk.
In 5.0.3 when offline or online, bound to Vault, a read-only file is editable and when you build a solution, it writes it to the disk.

Then you GetLatestVersion on a file (the first time with 5.0.3) and it is no longer able to be modified. You have to go to Explorer and remove the read-only attribute to allow editing.

This is seriously hampering the work of many of our senior developers in the organisation. Unbinding is not an option because the Visual Studio option for handling read-only files is even worse. Vault overrides that behaviour when its bound to a Solution.

Can you fix it, and in the meantime tell us what changes when GetLatestVersion is called on a file so that we may reverse that change with a script of some kind?
regards

Rob Goodridge
LANSA Pty Ltd
Software Made Simple
Vault 5.0.3

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Visual Studio Interface read-only handling defect

Post by Beth » Wed Mar 17, 2010 9:27 am

Are you using the Vault Enhanced Client or the Vault Classic Client?

If you are using the Enhanced Client and you don't want your files on disk to be set to read-only, then go to your Vault Tools - Options - Concurrent Development Style and change the Make Writable Option to Make All Files Writable. Then the users need to perform a Get to set that setting reflected in their files on disk.

If you are using the Vault Classic Client, then the files are required to be read-only.
Beth Kieler
SourceGear Technical Support

robe070
Posts: 176
Joined: Wed Feb 06, 2008 7:42 pm

Re: Visual Studio Interface read-only handling defect

Post by robe070 » Wed Mar 17, 2010 5:13 pm

We are using the Vault Enhanced Client. Its not an option to make them writeable. The fact they are made writeable by Vault, in 4.1.3, was how the developer distinguished the files that needed to be checked in.

In general we use the Check Out, edit , Commit development style and its a policy to make the files read-only to ensure no accidental changes are made that we don't know about. We know about the option to make the files writeable and it doesn't work for us.

Why did you change it?

And, why does doing a GetLatestVersion enable the changed behaviour?
regards

Rob Goodridge
LANSA Pty Ltd
Software Made Simple
Vault 5.0.3

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Visual Studio Interface read-only handling defect

Post by Beth » Fri Mar 19, 2010 3:40 pm

I am assuming you were receiving a window that offered you the option to overwrite read-only files. Is that how it was working for you before?

Are files that are modified checking out automatically or showing up as edited or renegade? At the very least, they would show as renegade in the Vault GUI client if they were never set to be writable nor checked out.
Beth Kieler
SourceGear Technical Support

robe070
Posts: 176
Joined: Wed Feb 06, 2008 7:42 pm

Re: Visual Studio Interface read-only handling defect

Post by robe070 » Sun Mar 21, 2010 5:05 pm

No it was not. No dialogs. Thats the whole point. This is how it was:

4.1.3 offline behaviour had the follow characteristics:

1. When a file with state NotCheckedOut+ReadOnlyAttribute was opened in Visual Studio, Visual Studio’s titlebar highlighted the file’s state as (ReadOnly).
2. Visual Studio did not stop me from making changes to the file and include the modified tag (ReadOnly)* in the titlebar.
3. The modified file could be saved individually or automatically by executing a build command. There were never any prompts or SaveAs dialogs involved in this operation.
4. Once the file was saved the (ReadOnly) part of the titlebar disappeared and Vault assigned the “renegade” status to the changed file.

With the new version of Vault, this behavior has changed in following ways:

1. When a ReadOnly file is opened in Visual Studio, it no longer shows the (ReadOnly) status and the behavior of Visual Studio is as described above.
2. If I open a ReadOnly file in VisualStudio and then get the latest version from Vault, the (ReadOnly) status appears in the titlebar. Now if I make a change, Visual Studio adds the asterisk status to the titlbar but when I attempt to save the file, I am presented a SaveAs dialog.

Why did you change it?

And, why does doing a GetLatestVersion enable the changed behaviour?
regards

Rob Goodridge
LANSA Pty Ltd
Software Made Simple
Vault 5.0.3

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Visual Studio Interface read-only handling defect

Post by Beth » Mon Mar 22, 2010 4:21 pm

I can't say we specifically changed anything to take away how you are working. Your scenario isn't something we anticipated as a need.

So that I can check into this further, which version of Visual Studio are you using? What type of project is this?

I do know that a GetLatest will apply any settings in Vault to the files on disk, so whatever may have changed would have been applied at that point.

F: 15344
Beth Kieler
SourceGear Technical Support

robe070
Posts: 176
Joined: Wed Feb 06, 2008 7:42 pm

Re: Visual Studio Interface read-only handling defect

Post by robe070 » Mon Mar 22, 2010 5:47 pm

Visual Studio 2008 SP1 all latest Windows Updates
C/C++ native project
regards

Rob Goodridge
LANSA Pty Ltd
Software Made Simple
Vault 5.0.3

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Visual Studio Interface read-only handling defect

Post by Beth » Thu Mar 31, 2011 2:56 pm

Is it required that you work in Offline mode? If you were Online, as soon as you edit, the file should auto-check out. I've reproduced what you are seeing in the Offline mode. I'm not sure of the root cause though. I will log a bug either way.

If a user knows they will be working on a file in Offline mode, could they check out out while still in Online mode before going to Offline?
The fact they are made writeable by Vault, in 4.1.3, was how the developer distinguished the files that needed to be checked in.
In VSS mode, Vault only changes the file to writable if there is a check out. Without the check out, Vault will not change the read-only setting.

The user can also identify which items to check in through CVS mode by looking at that Pending Changes window. In CVS mode, the items that have been edited are the only items that will show up as Edited in the Pending Changes.

F: 15915
Beth Kieler
SourceGear Technical Support

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Visual Studio Interface read-only handling defect

Post by Beth » Thu Mar 31, 2011 3:40 pm

I may have to scratch my last response. I think we found the setting you need to check.

Go to VS Tools -> Options -> Environment -> Documents -> Verify "Allow editing of read-only files; warn when attempt to save" is checked.

Does that take care of the issue for you?
Beth Kieler
SourceGear Technical Support

robe070
Posts: 176
Joined: Wed Feb 06, 2008 7:42 pm

Re: Visual Studio Interface read-only handling defect

Post by robe070 » Sun Apr 03, 2011 10:23 pm

Its a while since we last spoke on this issue. :-)
Beth wrote:Go to VS Tools -> Options -> Environment -> Documents -> Verify "Allow editing of read-only files; warn when attempt to save" is checked.
We already use this. VS will not allow the file to be saved. Its an error not a warning - when Vault is being used. This is the change in behaviour from Vault 4.1.3 to 5.0.3.
Beth wrote:Is it required that you work in Offline mode? If you were Online, as soon as you edit, the file should auto-check out. I've reproduced what you are seeing in the Offline mode. I'm not sure of the root cause though. I will log a bug either way.

If a user knows they will be working on a file in Offline mode, could they check out out while still in Online mode before going to Offline?
The whole point is to be making changes to source files WITHOUT checking out. This is so that the major mods made by the senior developer that can't be checked in for months do not hamper other developers working on more minor changes. (Also related to Feature Branches - see previous post - the senior developer 'should' be working in a Feature Branch where they can check in/out without effecting other developers)
Beth wrote:In VSS mode, Vault only changes the file to writable if there is a check out. Without the check out, Vault will not change the read-only setting.
Its not the read-only setting at issue, its changing the saving of a file VS warning message into an error.
Beth wrote:The user can also identify which items to check in through CVS mode by looking at that Pending Changes window. In CVS mode, the items that have been edited are the only items that will show up as Edited in the Pending Changes.
We don't use CVS mode. Company policy. Its been raised recently and rejected, again.
regards

Rob Goodridge
LANSA Pty Ltd
Software Made Simple
Vault 5.0.3

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Visual Studio Interface read-only handling defect

Post by Beth » Mon Apr 11, 2011 3:24 pm

We had another person perform testing on this and they reproduced the issue you see with the same settings you have, so the bug I logged will stand. Thanks for the additional details.

Unfortunately, the only work-around I have in the meantime is to make the files readable. If there's just one developer that needs to be able to edit with no check outs, then just that one developer can change their settings without affecting other users.


F: 15915
Beth Kieler
SourceGear Technical Support

robe070
Posts: 176
Joined: Wed Feb 06, 2008 7:42 pm

Re: Visual Studio Interface read-only handling defect

Post by robe070 » Tue May 10, 2011 5:18 pm

I missed your response somehow, hence its taken a while to get back to you.

Just a comment, no response required - the workaround is not suitable as the senior developer still needs to work with other users for some work.
regards

Rob Goodridge
LANSA Pty Ltd
Software Made Simple
Vault 5.0.3

Post Reply