Occasionally losing RC file data

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

Moderator: SourceGear

Post Reply
BigBrett
Posts: 188
Joined: Wed Feb 01, 2006 8:45 am

Occasionally losing RC file data

Post by BigBrett » Mon Jun 21, 2010 3:09 am

We are using Fortess 2.0.4.18845 Enhanced Client in VS2005.

From time to time a developer will want to make a change to some resource in the RC file, which they do not currently have checked out, and start editing. When they attempt to save the RC file they are prompted to check out the RC file and then Resource.h which they do. After checking the resource files back in we discover that some change to the resources made by another developer in the time between the last Get of the RC file by the current developer and this prompted checkout has now disappeared.

It would appear that the Enhanced Client is not checking if the local copy of the RC file is older than the repository version before checking out so is not performing a Get, just the checkout.

Is there some way to force the Enhanced Client to Get the latest version of the RC and h file from the repository (if the local versions are older) before checking out when resource editing is carried out without checking out beforehand ?

Regards,
Brett

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

Re: Occasionally losing RC file data

Post by Beth » Mon Jun 21, 2010 7:52 am

Does the developer get any warnings at all, such as the files need to be merged?

Upon check-in, if someone else checked in changes, Vault will give a Needs Merge status. It is possible to just select the option to resolve the merge status without doing any merging, and then the check-in ignores any changes checked in by the other developer.
Beth Kieler
SourceGear Technical Support

BigBrett
Posts: 188
Joined: Wed Feb 01, 2006 8:45 am

Re: Occasionally losing RC file data

Post by BigBrett » Mon Jun 21, 2010 9:07 am

The developer concerned says no warnings at all received (as was the case the previous times this happened).

We operate on an exclusive-checkout basis so the RC and h files could not have been modified while he was busy working on his checked-out version. It is his checked-out version that is lacking elements previously added to the file by another developer and checked in prior to his check-out.

Regards,
Brett

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

Re: Occasionally losing RC file data

Post by Beth » Mon Jun 21, 2010 10:17 am

When your user checks out, there are file options that can be adjusted. Does the user have it set to Overwrite, or Do Not Overwrite/Merge Later, or Attempt Automatic Merge?
Beth Kieler
SourceGear Technical Support

BigBrett
Posts: 188
Joined: Wed Feb 01, 2006 8:45 am

Re: Occasionally losing RC file data

Post by BigBrett » Tue Jun 22, 2010 12:43 am

The integration options are set as "Prompt to Check Out" on edit, the checkout file options are set to "Prompt" for modified local file.

We ran a test where I modified a resource which changed the RC file. The developer opened the same resource in his IDE, I checked in the modified RC file, he modified his copy of the resource and was prompted to checkout the RC and h file, and my modification was lost when he checked in his changes.

We reversed the test and saw that my local version of the RC file was updated with his changes but the resource which I had open in the RC editor of the IDE was not updated after the checkout. Saving my changes to the resource overwrote the modified RC file with my in-memory (and now outdated) version of the resource which explains how the modifications get lost.

This would appear to be more of a Visual Studio problem than a Fortress problem.

Cheers,
Brett

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

Re: Occasionally losing RC file data

Post by Beth » Tue Jun 22, 2010 2:11 pm

In VS, go to Environment - Documents. Do you have the option checked to detect when a change happens outside the environment?
Beth Kieler
SourceGear Technical Support

BigBrett
Posts: 188
Joined: Wed Feb 01, 2006 8:45 am

Re: Occasionally losing RC file data

Post by BigBrett » Tue Jun 22, 2010 11:21 pm

That option is enabled although the sub-option for autoload is not.

In the same situation with .cpp or .h files, the updated file is automatically loaded at checkout time. It seems that .rc files do not have the same mechanism.

Regards,
Brett

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

Re: Occasionally losing RC file data

Post by Beth » Fri Jun 25, 2010 10:09 am

What you could try as a work-around is to check out the file in Fortress before opening the project in VS.
Beth Kieler
SourceGear Technical Support

Post Reply