What is the difference between locking an element

2019-06-04 20:29发布

问题:

"cleartool lock" command can be applied to lbtype object "REL1" as well as "file element foo.c version \main\3".
Assume REL1 has been applied to foo.c@@\main\3.
Assume foo.c@@\main\2 is unlocked.

Applying lock to lbtype object "REL1" will prevent applying "REL1" to any more versions of any other files.
This will not prevent replacing "REL1" on an foo.c version \main\3 with another yet unlocked LABEL TYPE "REL2" for example.
This will prevent relocating "REL1" to foo.c@@\main\2 assuming foo.c@@\main\2 is unlocked.

Applying lock to "foo.c@@\main\3" will prevent removing the already applied RELEASE LABEL type to that particular version to be replaced or to add any more new LABEL TYPE to that foo.c@@\main\3 of the element or removing any already applied Release Label Types to foo.c@@\main\3.

Applying lock to an element version doesn't prevent checkout for the element version.

Are all the above statements correct, so that I understand difference locking Release Label Types and File Element Versions?

回答1:

cleartool lock

Applying lock to lbtype object "REL1" will prevent applying "REL1" to any more versions of any other files.

yes:

Label type. If a label type is locked, you cannot do the following:

  • Use the type in an rmtype, rename, or mklbtype –replace command
  • Attach or remove a version label of that type with mklabel or rmlabel (This includes moving a label from one version to another with mklabel –replace.)

This will not prevent replacing "REL1" on an foo.c version \main\3 with another yet unlocked LABEL TYPE "REL2" for example.

Not exactly "replacing": you can add many different labels on a given version.

This will prevent relocating "REL1" to foo.c@@\main\2 assuming foo.c@@\main\2 is unlocked.

Yes:

Version Lock:

If a version is locked, you cannot do the following:

  • Attach a label using mklabel
  • Remove a label using rmlabel or mklabel -replace
  • Attach an attribute using mkattr
  • Remove an attribute using rmattr or mkattr -replace
  • Remove the version using rmver


标签: clearcase