This config spec defines a dynamic configuration, which selects changes made on the main branch of every element throughout the entire source tree, by any developer:
(1) (2) |
element * CHECKEDOUT element * \main\LATEST |
This is the default config spec, to which each newly created view is initialized. When you create a view with the mkview command or the View Creation Wizard, the contents of file default_config_spec (located in ccase-home-dir) become the new view's config spec.
A view with this config spec provides a private work area that selects your checked-out versions (Rule 1). By default, when you check out a file, you check out from the latest version on the main branch (Rule 2). While an element is checked out to you, you can change it without affecting anyone else's work. As soon as you check in the new version, the changes are available to developers whose views select \main\LATEST versions.
The view also selects all other elements (that is, all elements that you have not checked out) on a read-only basis. If another user checks in a new version on the main branch of such an element, the new LATEST version appears in this dynamic view immediately.
By default, snapshot views also include the two version selection rules shown above. In addition, snapshot view config specs include load rules, which specify which elements or subtrees to load into the snapshot view. For details on creating snapshot views see Developing Software or online help.
PRODUCT NOTE: Rational ClearCase LT supports only snapshot views.
The two configuration rules in the default config spec appear in many of this chapter's examples. The CHECKEDOUT rule allows you to modify existing elements. If you try to check out elements in a view that omits this rule, you can do so, but cleartool generates this warning:
Z:\vob_pr3\src> cleartool checkout -nc cmd.c
cleartool: Warning: Unable to rename "cmd.c" to "cmd.c.keep": Read-only
filesystem.
cleartool: Error: Checked out version, but could not copy to "cmd.c": File
exists.
Correct the condition, then uncheckout and re-checkout the element.
cleartool: Warning: Copied checked out version to "cmd.c.checkedout".
cleartool: Warning: Checked-out version is not selected by view.
Checked out "cmd.c" from version "\main\7".
In this example, the config spec continues to select version 7 of element cmd.c, which is read-only. A read-write copy of this version, cmd.c.checkedout, is created in view-private storage. (This is not a recommended way of working.)
The \main\LATEST rule selects the most recent version on the main branch to appear in the view.
In addition, a \main\LATEST rule is required to create new elements in a view. If you create a new element when this rule is omitted, your view cannot "see" that element. (Creating an element involves creating a main branch and an empty version, \main\0.)
It makes sense to omit one or both of the standard configuration rules only if a view is not going to be used to modify data. For example, you can configure a historical view, to be used only for browsing old data. Similarly, you can configure a view in which to compile and test only or to verify that sources have been labeled properly.
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |