![]() |
|||||||||
| SnapshotCM User Guide | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The advanced technology in SnapshotCM simplifies tasks that used to be difficult, time-consuming or error-prone, while continuing to provide top-notch support for routine operations. This document describes user tasks, with the goal of helping new users more quickly learn SnapshotCM, while also providing insights to help an experienced user of SnapshotCM be even more productive. As always, feedback to support@truebluesoftware.com is welcomed. Logging in to SnapshotCMBefore you can access SnapshotCM, the SnapshotCM administrator must create a SnapshotCM account for you to use. Typically, the SnapshotCM account name will be created to match your operating system account (login) name and you will not need to do any explicit SnapshotCM account name configuration. But if they are different, you can explicitly configure the SnapshotCM account to use by setting the SNAPSHOTCM_ACCOUNT environment variable. Note also that SnapshotCM account names are case insensitive. That is, kate, KATE and Kate are all equivalent SnapshotCM account names. For example, Katelyn's operating system login account is kate on most of her systems, but is kkramer on some. Since her SnapshotCM account name (Kate) differs from her kkramer login, she will need to set the environment variable SNAPSHOTCM_ACCOUNT=kate on those systems. Trusted Login ConfigurationThe operating system account (login) name is also visible in the Trusted Logins/Hosts list associated with each SnapshotCM account. In this list, the logins referred to are the operating system accounts from which trusted access to the given account is to be allowed. Continuing the previous example, to add trusted access to the Kate SnapshotCM account for the kkramer and kate OS logins, add two lines to the Trusted Logins/Hosts patterns for the Kate SnapshotCM account:
Multiple entries for each OS login can be created if that facilitates defining appropriate host patterns. The GUI's help describes the wildcard patterns supported for these fields. Understanding WorkspacesA workspace is a location on your local file system which is associated with the file hierarchy of a snapshot. In the SnapshotCM GUI, the association between files in your workspace and files in the associated snapshot is managed automatically. The GUI makes the choices for you. However, when operating from the command-line, much more flexibility is provided. The following discussion describes how the mapping works, the command-line options available, and how they can be used in various scenarios. Most workspace commands need to know four things to operate: the server, the snapshot, the full path of the file in the snapshot and the full path of the file in the workspace. The last two are related in that the workspace root directory path plus the full path in the snapshot equals the full local path. For example, if the workspace root directory is C:\Work\WS and the full path in the snapshot is /src/cmd/file.cpp, then the full local path is C:\Work\WS\src\cmd\file.cpp. Given either one of these paths and the workspace root directory path, we can easily determine the other path. The workspace mapping provides the association between a workspace hierarchy and a snapshot hierarchy. Workspaces normally associate the full hierarchy in a snapshot with a workspace, but on the command-line, it is possible to associate only a portion of the snapshot hierarchy with a workspace. The first three uses assume you have not specified a workspace mapping on the command-line:
Merge ScenariosThe simplest merge is the one no one has to do. Therefore we recommend structuring your work, as much as is practical, to avoid unnecessary merges. And when merges are likely, arrange for them to be trivial. Of course, sometimes merges are necessary or their benefit outweighs the cost. SnapshotCM handles merges of all attributes and in many cases, the merges are trivial and once selected, handled automatically. The following addresses those cases which are not so trivial. Merge TypesMost often, when changes are copied from one snapshot to another, no merge will be necessary because an item will be changed in only one snapshot. That change will be copied automatically without conflict. Only when the same attribute is modified independently in two or more snapshots will a conflict occur. These parallel changes, or variants, require manual resolution. Parallel changes to all attributes other than file content can be resolved directly during the copy between snapshots. Parallel file content changes are merged using a variation of the check out, edit (merge), check in process used for normal content changes, though much of the task is automated. Content MergingWhen parallel changes are applied to the content of a file, one can choose one of the revisions to keep, or one can, for text files, merge the changes together to create a new, merged revision. In SnapshotCM, the results of a content merge are always stored in a file in a workspace, which can then be verified and modified as necessary before the results are checked in to a snapshot. Parallel changes can occur in two different scenarios discussed next. Merge From a Snapshot into a WorkspaceWhen you modify a file in your workspace, and then your snapshot is updated with other changes to that file, your local file becomes both modified (by you) and out-of-date (changed by someone else since you checked out the revision). You have three choices:
This scenario does not result in any branches in the file history. Merge Between SnapshotsWhen parallel changes have been checked in (to different snapshots), a merge becomes necessary to combine the parallel content changes into one of the snapshots. In the Copy Changes dialog, a conflict will be identified by a double-ended red arrow. Clicking on the red arrow will bring up the Customize Resolution dialog box. While this dialog has many options for obscure conflict cases, the File Content: options of interest are shown on the left. The three most common options for resolving content conflicts are: Merge, Source and Target. Once Merge, Source or Target is selected. Press OK or Apply to set this resolution method. Select Apply Changes to merge the parallel changes, together with the original base revision, into the named workspace and then edit the workspace file to examine the results and resolve any conflicts. From the command-line, use ssupdate or sscopy to perform the same selections. Resolving Content Merge Conflicts using the Batch-mode Merge ToolIf you've configured a graphical merge tool, that tool will be used to resolve conflicts. The following discussion applies to the batch merge method. When the same region of a file is modified in different ways by both changes, the conflicting region will be bracketed in the workspace file. If a file region is modified by only one change, or is modified identically by both changes, it will not be bracketed. Bracketed conflicts must be manually resolved. Bracketed conflicts will contain three versions of the conflicting region of text: the original version plus each of the changed versions. The versions of the region are separated by four different separator lines. An example will illustrate:
Notice the complete conflict is bounded by the "<<<<<<<" and ">>>>>>>" separator lines. Searching for these lines will quickly locate bracketed conflicts. The first separator line identifies your version of the region (YOURS). In this example, it is FILE, revision 1 as modified in the local workspace. Next comes the ORIGINAL version of the region (the version from which the variants were created). It is FILE revision 1 in the example. Lastly comes the other changes (THEIRS), which is from FILE revision 2. To resolve the conflict, you need to reduce each bracketed conflict in the file to one merged version without separator lines and then verify the results. That, of course, is an exercise left to the reader. :--) Text and Binary Files In Your WorkspaceLet's start this discussion with a definition of what distinguishes text and binary files. In SnapshotCM, text files are those files which will have end-of-line (EOL) translation performed on them during check in and check out, while binary files are those for which no EOL translation will be performed. EOL translation is necessary because the various operating systems of our day do not agree on how to store EOL indications in text files. SnapshotCM understands three EOL text formats: Unix, Windows and Mac. Unix systems use a single nuline character ('\n' or ascii 10), Windows systems use carriage return and nuline characters ("\r\n" or ascii 13 followed by ascii 10), and Macintosh systems use a single carriage return character ('\r' or ascii 13). In order to allow seamless operation in such a mixed environment, SnapshotCM provides EOL text format translation on both check out and check in:
The net result is that any text file can be edited in any text format in any workspace and still be checked in without confusing SnapshotCM. Workspaces and Remote File SystemsOn check out, the format that is written is specified by the workspace mapping in effect. The workspace text format defaults to that of the execution platform, but can be set to other values. For example, using Samba or other remote file system, you can use the SnapshotCM Windows GUI to create and maintain a unix workspace. One simply need select the unix text format when creating the workspace and text files in that workspace will be written in unix format by all SnapshotCM tools. Sharing WorkspacesWith remote file system access, it may be tempting to share a workspace between systems with different EOL text formats. While we recommend setting up a workspace per platform, if all your tools on all your platforms can handle the same or both text formats involved, sharing a workspace will work. But if, for example, some Unix tools cannot handle Windows format and some Windows tools cannot handle Unix format, you will be setting yourself up for problems. Nevertheless, if such files need only be accessed from one system or the other, but not both, this can still work with a little care. For example, if most files are handled OK as unix format, that format can be used in the workspace and the few Windows-only format text files to be used only by Windows tools can be marked binary to disable the EOL text format conversions on check in and check out. As a binary file, the EOL characters will not be modified by SnapshotCM and the Windows tool can continue to get the desired format. This works as long as the Windows-only files need not be accessed by a tool that does not understand and preserve the format. Shared Workspaces and Auto-homeIf you have difficulties with SnapshotCM workspace mappings in an auto-home configuration, or if you are wanting to share a workspace between multiple machines, the following may be helpful.
SnapshotCM Environment VariablesSnapshotCM provides several environment variables to customize behavior. In common use, none of these need be set.
Enabling and Disabling SnapshotCM's SCC Integration on WindowsSnapshotCM integrates into Developer Studio and other tools using the SCC API, providing SnapshotCM operations directly from within these environments. This integration is installed and configured by the SnapshotCM installer on Windows. The following describes how to enable, restore or disable SnapshotCM's SCC integration. To enable or restore SnapshotCM's SCC integration, load the SnapshotCM.reg file from SnapshotCM's install directory: regedit "c:\Program Files\True Blue Software\SnapshotCM\SnapshotCM.reg" To disable SnapshotCM's SCC integration, load the SCCDisable.reg file in SnapshotCM's install directory: regedit "c:\Program Files\True Blue Software\SnapshotCM\SCCDisable.reg" Removing Snapshots and ProjectsIf a SnapshotCM project or snapshot becomes uninteresting or obsolete, you can remove it. Since recovery from such deletion is not easy, SnapshotCM requires confirmation before performing such removal. And a couple of conditions must be satisified before a snapshot or project is removed:
The above operations can be performed via the GUI. The following unix shell script also can be used to remove a project. Customize appropriately. # Remove snapshots in /Test project on host:
if [ $# -lt 1 ]; then
echo "usage: $0 host ..." >&2
exit 2
fi
for host in $*
do
sslist -RHX -h $host /Test | # list all snapshots in /Test project
sort -r |
while read ss
do
wset -quR -h $host -S "$ss" / # Unlock all files
ssremove -h $host "$ss" # Remove snapshot
done
done
SnapshotCM Error MessagesThe following is a partial list of SnapshotCM error messages. Each message contains a description of the possible causes of the error, and a discussion of what to do next.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Product Info | Testimonials | Documents | Licensing | Company Info | News | Download | Home | Simplify CM | ||
| Copyright © 2000-2007 True Blue Software Company. All rights reserved. |