Auto checkout for editing not working

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

Moderator: SourceGear

Post Reply
andrewstanton
Posts: 31
Joined: Wed Nov 18, 2009 9:58 am

Auto checkout for editing not working

Post by andrewstanton » Tue Apr 20, 2010 3:01 am

Hi,

I have Visual Studio 2008 Pro and SoS 5.0.2 IDE client.

I have opened a C# project from disk that was previously bound to SoS source control, but I have since changed the server address of the SoS server, so upon opening the project from disk I "permanently removed source control bindings" and then re-bound the project to my SoS repository at it's new address/IP. This worked fine, no problems.

But, when I open a file in the project and start editing it (i.e. just start typing and changing the code) the file does not automatically get checked out. It means I've made various changes to files in the project and then discovered I've effectively been editing them offline because the SoS IDE client did not check them out for me. This is the first time I've edited a project using the SoS IDE 5.0.2. Previously, I've used 5.0.1, 5.0.0 and 4.2 and my files have always been checked out automatically, so I don't know if this is a problem with 5.0.2 or something strange about my setup. I have confirmed in Visual Studio's Options under Source Control that the SOS 5 Client is being used, and that "Automatically check out files for editing" is enabled.

Any ideas?

Thanks,
Andy.

jclausius
Posts: 3649
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Auto checkout for editing not working

Post by jclausius » Tue Apr 20, 2010 7:52 am

Andy,

That is strange, and would not be caused in SOS 5.0.2 as I don't recall touching any of the IDE code except when opening a project from File -> Open from Source Control.

Off the top of my head, here are some things to check:

How many projects are under your solution? Within the solution and each and every project folder there should be a "MSSCCPRJ.SCC" file. Can you check the values in there to see if those point to the same server.

Visual Studio will also create *.vspscc files, although I don't know if the values there will indicate any kind of issue.

Finally, can you double check the READ ONLY file attribute. Those need to be SET when NOT CHECKED OUT, and UNSET when checked out for Visual Studio to correctly show the checkout icon associated with a file.
Jeff Clausius
SourceGear

andrewstanton
Posts: 31
Joined: Wed Nov 18, 2009 9:58 am

Re: Auto checkout for editing not working

Post by andrewstanton » Tue Oct 12, 2010 3:55 am

Hi Jeff,

Since I reported this 6 months I stopped worrying about it because I was due to rebuild my development environments. I have since completely rebuilt two machines and replaced Visual Studio 2008 with Visual Studio 2010 on both machines, as follows:

- Machine A: Windows 7 Ultimate 64-bit, SoS 5.0.2 Server, SoS 5.0.2 Client, VS 2010 Pro.
- Machine B; Windows 7 Ultimate 32-bit, SoS 5.0.2 Client, VS 2010 Pro.

Machine A hosts the SoS 5.0.2 Server and both machines use the SoS 5.0.2 Clients to connect to it for source control.


Basically, even with the rebuild and new Visual Studio 2010 install, Auto-Checkout when editing files still fails periodically. I can have a C# project open in VS, and some files will check-out automatically when I start to edit them, but some files won't. It's not the same files every time, as I can restart VS and then maybe all files will check-out automatically, or maybe a different subset will fail to check-out. I'm now having to do a project diff when I finish a development session to make sure SoS hasn't missed any files I may have edited. This happens on both of my development machines.


To answer your previous questions:

- There is usually 1 - and sometimes 2 - project(s) in my solutions.
- There is an "MSSCCPRJ.SCC" file with each project.
- There are "*.vspscc" files where I expect them to be.
- The Read-Only file attribute appears to be being unset correctly (by VS or SoS client - not sure which is responsible for doing this) when I start to edit a file, but the file itself (sometimes, and I can see no pattern to it) doesn't get checked out, i.e. it's icon remains as a blue padlock, and the file doesn't appear in the Pending Checkins list. If I look at the file using the stand-alone SoS client (i.e. not via the VS plug-in) the file is indeed not checked out.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Auto checkout for editing not working

Post by lbauer » Thu Oct 14, 2010 3:28 pm

Hmm. We haven't had other reports of this, but we can try to reproduce it.

Is it possible that the files are checked out in VSS?

Are mulitple checkouts enabled?

What type of C# project is this?
Linda Bauer
SourceGear
Technical Support Manager

andrewstanton
Posts: 31
Joined: Wed Nov 18, 2009 9:58 am

Re: Auto checkout for editing not working

Post by andrewstanton » Fri Oct 15, 2010 6:22 am

Hi Linda,

There are no files checked out in VSS, Multiple Checkouts is not enabled, and the C# project type is an ASP.NET 3.5 Web Application.

Let me know if you need any more info,
Andy.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Auto checkout for editing not working

Post by lbauer » Mon Oct 18, 2010 3:24 pm

Is it possible that some of these files were read-only prior to modifying them in Visual Studio?

When I modified file in Visual Studio, it was always checked out automatically.

However if I unset the read-only bit on the file in the filesystem, Then opened the project in Visual Studio 2010, VS showed the file with the little padlock beside it, and even when I modified the file within Visual Studio, it was not checked out.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply