July 2, 2009
All about the .MySCMServerInfo file
Recently there have been a couple posts about moving working directories and the .MySCMServerInfo file. Some users are not sure what this file is, what it is for, and what it does. During one of my on-site visits, a user thought that the application was being used incorrectly because all of these strange .MySCMServerInfo files kept popping up in every working directory. Even as the user deleted the .MySCMServerInfo files, they kept coming back! Following are some of the ways that Surround SCM uses the .MySCMServerInfo file: File Status The main purpose of the .MySCMServerInfo is to give you a quick status of your local files. The status is a comparison between your local files and the latest versions in Surround SCM. .MySCMServerInfo contains information about each file's modification timestamp and CRC, which Surround SCM uses when determining the file status. Imagine that you select a view in Surround SCM that shows you several hundred, if not thousands, of files. If Surround SCM had to compare each file, one by one, it would take some time before you were able to see the status of each file. The .MySCMServerInfo file allows Surround SCM to return the status much quicker. [caption id="attachment_645" align="aligncenter" width="250" caption="File status in Surround SCM"][/caption] Working Directory Mismanagement The .MySCMServerInfo file in each working directory also stores the branch and repository associated with the working directory. When you try to set the working directory for a branch and repository, and choose a directory that used to be a working directory for another branch and/or repository, you will get a working directory conflict message. This is because Surround SCM sees the .MySCMServerInfo files and sees the references to another branch and/or repository. You can choose to ignore the conflict and move on, but as a best practice you should rarely share the same working directory with another branch because you run the risk of checking in changes to files that do not belong in the current branch and/or repository. [caption id="attachment_647" align="aligncenter" width="479" caption="Working directory conflict message"][/caption] IDE Integration Regardless of the IDE that you use, setting up the integration with Surround SCM can end up saving you a lot of time. Based on my experiences, having your working directory set up first, and doing a get (which creates the .MySCMServerInfo file) before opening the IDE seems to save me a lot of time and hassle. This is because when you tell your IDE that you want to use Surround SCM as your source control provider, the following steps usually take place:
- You open the IDE and open the project, workspace, site, solution etc.
- You tell your IDE you want to use Surround SCM as your SCC provider.
- Your IDE turns SCC control over to the Surround SCM SCCI DLL/ plugin.
- Surround SCM looks for a .MySCMServerInfo in the directory where the project, workspace, site, solution, etc. was opened from. If a .MySCMServerInfo file is found, then Surround SCM knows which branch and repository it needs to link to. Otherwise, you will get a message telling you that Surround SCM was not able to determine an association between the directory and a branch/repository in Surround SCM.
del *.MySCMServerInfo /sTo recreate the file simply do a get to the directory where the file was deleted.