Options for Get Latest operations

A collection of information about Vault, including solutions to common problems.

Moderator: SourceGear

Post Reply
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear

Options for Get Latest operations

Post by jeremy_sg » Fri Feb 13, 2004 3:09 pm


In Vault, when you either Get Latest Version or Check Out a file, you are given three options to handle any modified local file:
  • Overwrite the local file
  • Do not overwrite/Merge Later
  • Attempt an automatic merge
Only files that are of status Renegade, Edited, Merged, and Needs Merge are affected by this setting. All other files are considered unmodified, and they are updated if necessary. For more information on file statuse read the Explanation of Vault File Status.

Overwrite the local file. If you select this option, then all locally modified files will be overwritten with the latest contents from the repository. If you have the "Save files in backup folder before overwriting" option set to true, then a copy of the files will be saved in the backup directory _sgbak in that file's working directory.
Attempt automatic merge. If you select this option, then Vault will attempt to incorporate the changes from the repository into any locally modified files. Automatic merge works for the vast majority of cases. The main state in which automatic merge cannot work is when your local file has a change to the same line as a change in the repository. If the file cannot be automatically merged, its state will be set to "Needs Merge", and no checkin of the file will be allowed until you manually merge the file.
Do not overwrite/Merge Later. If you select this option, no changes will be made to your local file.


In the Get Latest dialog, if you check the "Prompt for modified files", you will be prompted to choose between Overwrite, Merge, and Do not overwrite for each modified file. If you select the "Apply to all subsequent files" checkbox, then all subsequent locally modified files will behave as you specified.

Unknown Files

Files with status Unknown are special cases in Vault. An Unknown file is a file that the Vault client has not downloaded before. The local file may match the file on the server, but if the Vault client did not download any version of it previously, it doesn't know if the file has changed. Vault's design requires that every file have a baseline version, so it can compute the difference between the edited version and the baseline version before checking in the file. Files of status Unknown cannot be checked in.

During a Get Latest operation, an Unknown file will be overwritten if the options are either Overwrite or Attempt Automatic Merge, and if the "Save files in backup folder before overwriting" option is set to true, it will be backed up. A merge cannot be attempted on an Unknown file, so it is better to overwrite and backup.

Binary File Types

Binary, or non-mergeable files are files that Vault cannot automatically merge. A file is considered binary if its Type has been set to Binary in the Properties dialog or if it has an extension which is not in the "Mergeable Files" list in the Vault Admin Tool's Repository Options tab.

Because binary files cannot be merged automatically, a Get Latest operation that is set to "Attempt Automatic Merge" on that file will fail, and the file will not be overwritten. In order to resolve this situation, you should either Get Latest on the file with "Overwrite" set and re-edit the new file to include your changes, or View the latest copy of the file from the repository and edit the file to incorporate the repository changes into your working directory. You might then need to choose "Resolve Merge Status" in the context menu in order to tell Vault that you have manually merged the file.

Post Reply