Bug 1657 - Changes to read-only project file silently ignored
Summary: Changes to read-only project file silently ignored
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Version Control ()
Version: unspecified
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Lluis Sanchez
Depends on:
Reported: 2011-10-24 04:57 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2013-07-16 09:01 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Rolf Bjarne Kvinge [MSFT] 2011-10-24 04:57:58 UTC

Comment 2 Jeffrey Stedfast 2012-01-09 15:20:02 UTC
I think we'll need to know how many of our customers are actually using Perforce before marking this "High".
Comment 3 Jeffrey Stedfast 2012-01-09 15:51:33 UTC
May be of interest: http://lists.ximian.com/pipermail/monodevelop-list/2010-August/012396.html
Comment 4 Mikayla Hutchinson [MSFT] 2012-01-09 17:04:27 UTC
We should at least show an error dialog rather than losing data silently. Maybe we could show a dialog that would present the option to attempt to make the file writable and try again, something like:
The project could not be saved because the file {0} is read-only. Would you like MonoDevelop to attempt to make the file writable and try again?
[Cancel] [Try again]

Maybe we could standardize on some standard dialog for all files that have this same problem. And in some cases, many files will be saved at once, so we need an option to apply the decision to all the operations.

Ideally we could integrate this with the VCS providers, to give the user a chance to "check out" (lock) the file, but that would be a longer term improvement.
Comment 5 Alan McGovern 2012-09-24 05:19:37 UTC
Bumping this to high because it's still being reported every now and again.
Comment 6 Lluis Sanchez 2013-07-03 04:04:41 UTC
Two things can be done:
1) Before saving a project or solution, call FileService.RequestFileEdit(theFile). Version control system can plug into this method to show custom dialogs for locking/unlocking files. This should in fact be called for any file we write in the IDE.
2) If changes on a project/solution can't be saved because the files are read-inly, then we should show an error message.
Comment 7 Lluis Sanchez 2013-07-12 09:08:49 UTC
I'll take care of this.
Comment 8 Lluis Sanchez 2013-07-16 09:01:48 UTC