Visual Studio 2005 Get Latest not automatic on checkout

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

Moderator: SourceGear

Post Reply
ablesa
Posts: 16
Joined: Fri Oct 26, 2007 10:05 am

Visual Studio 2005 Get Latest not automatic on checkout

Post by ablesa » Fri Oct 26, 2007 10:35 am

We have recently upgraded to version 4.2 of the SourceOffsite client and I'm seeing some things that I don't understand.

For instance, another team member added some strings to our project's resources (resx file) yesterday and checked the changes into SOS.

Today, I opened the project, but didn't explicitly do a "get latest"... I wanted to change some icons on some of the forms in our project. I did not explicitly get latest or check out the resources file, but instead did the following: I opened one of the target forms, right-clicked on the toolstrip button that I wanted to change the image for, selected "project resource file" as my resource context for the image and then clicked on Import button to locate the image and load it into the resources. My expectation was that yes, I was going to edit the resources file, but I didn't expect to have to explicitly get latest before editing...I thought that would be done implicitly for me.

Normally, when I start to edit a file in a project, the IDE does an implicit "get latest" on the file and then checks it out for me to edit.

It appears, however, that in the situation I described above, a get latest was not done implicitly and my other team member's resource changes were lost when the IDE checked the file out for me to edit.

Can you confirm if this is a bug or is there something else that you think happened?

Many thanks for any information you can provide.

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

Post by Beth » Fri Oct 26, 2007 12:29 pm

I'm thinking it would be a case of where something else happened. We have no bugs I'm aware of like that.

Just to make sure I understand what happened. You opened a file and made an edit. When you checked in, it overwrote your co-workers changes? Does your co-worker still have the original file in disk?

As long as the changes were checked in, they are retrievable. I just need to identify what happened where and what part was lost.

Did you have the entire solution open or did you just open a file?

Is your option to have a check out happen on edit still checked? That's in VS under Tools - Options - Source Control - Environment.

Also, I'm going to move this thread to the regular SourceOffSite forum area instead of Collab.

ablesa
Posts: 16
Joined: Fri Oct 26, 2007 10:05 am

Visual Studio 2005 Get Latest not automatic on checkout

Post by ablesa » Fri Oct 26, 2007 1:20 pm

My IDE (visual studio 2005) is setup to have edited items checked out automatically. I always open the entire solution and not just individual files or projects. Note that NORMALLY, if I attempt to make a change to a document in the IDE, the following happens AUTOMATICALLY: "Get Latest" is done on the file and the file is checked out; all automatic with no effort on my part. This is what I would expect.

The situation I'm describing is a tad different. I am editing a form in my solution and the edit that I am doing also makes a change to the resource (RESX) file for the project. I don't beleive the "get latest" AND "checkout" occurred on the RESX file...I think only the "checkout" occurred.

Here's the sequence of events:
* My co-worker edited the the Resources.resx file yesterday and checked in his changes.
* today, I opened the solution and displayed a form. My intent was to change an icon image (we store images in the project resources file).
* I did NOT get latest or check out the resources.resx file ahead of time. I knew I would be, in effect, modifying the resources, but I also thought that the IDE would get the latest resource file and check it out for me as part of my operation.
* At this point, neither the form that I'm going to modify or the resources file is checked out of SOS.
* So, I right-clicked on the button on the form who's image I wanted to change and selected "Set Image" (this button is in a toolstrip). Once I do that, I get a dialog for me to find and set the image. In that dialog, I tell it that I want the image to be in the resources file. This dialog is called "Select Resource".
* Once I click OK on the "Select Resource" dialog, the IDE SHOULD get latest on the resource.resx file and then check it out for me and add the image to the resources. Instead, it appears to have skipped the "get latest" step and simply checked out the resources file and applied my change. SO, I ended up NOT getting my co-workers changes before the checkout and therefore, when I checked in my changes, I over-wrote what he'd done yesterday.

Thank you for your help!

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

Post by Beth » Mon Oct 29, 2007 10:54 am

We're trying to reproduce it here, but haven't had any luck yet. One of our developers has seen VS not check out a file or two sometimes, but hasn't pinpointed if it's us or VS.

Can you check your SOS server manager to make sure that's not an excluded file type?

In IDE options plug-in settings, click the advanced button and go to the files tab. Make sure the option 'never replace local copy during check out' is not set. The handle conflicts area should be set to either 'automatic merge' or 'overwrite. Also, make sure the option to skip checked out files is not checked.

Let me know the results of checking these options.

ablesa
Posts: 16
Joined: Fri Oct 26, 2007 10:05 am

Post by ablesa » Mon Oct 29, 2007 11:21 am

Something you said made me think that maybe you are chasing the wrong problem. You said: "One of our developers has seen VS not check out a file or two sometimes, but hasn't pinpointed if it's us or VS".

Please note that VS 2005 DID check out the file. What it DIDN'T do is "GET LATEST" on it BEFORE it checked it out. I have only noticed this behavior on the RESX file when I was implicitly adding a value to RESX by setting the image on a button in a toolstrip and telling it to add the image to the resources at the same time.

In the SOS Server Manager, there are no excluded file types...its a blank list.

"never replace local copy during check out" is not checked in my IDE settings.

I did see something odd in the SOS client while poking around at some of the settings you asked. I looked at tools/Options and the File Types tab (again, in the SOS Client). The file types it shows are not really valid for Visual Studio 2005. For instance, it shows "All Files', which is ok. But then, when I click on "Visual Basic", it shows the file types "*.bas;*.cls;*.frm;*.frx;*.res;*.vbp;*.mak". These are old file types... current ones would be *.vb, *.resx, etc. I would doubt that this makes a difference, but I just thought it odd. I'm not really sure what this list of "File Types" does.

Anyway, thanks for hanging in there with me. I appreciate your help. If I see anything else on my end, I will log it here.

Post Reply