Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
959 views
in Technique[技术] by (71.8m points)

visual sourcesafe - What is the difference between clearcase and vss in label a release?

We are using clearcase as our SCM. I have not much experience with clearcase. Now we are about to release our code to production. I want to label my code as I have done using VSS in my previous projects. But in clearcase labeling is not as easy as in VSS. clearcase is asking to create a label type before label a folder in VOB. I don't understand the concept of creating label type? Any guidance on this will be highly appreciated.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
  • a lbtype is a template, a declaration.

  • a label is the instance that will be put on each versions needed to be labeled.

See mklbtype

The mklbtype command creates one or more label types with the specified names for future use within a VOB.
After creating a label type in a VOB, you can attach labels of that type to versions of that VOB's elements, using mklabel.

You also can attach a constraint on a lbtype:

By default, a new label type is constrained to use on only one version in an element's entire version tree.
This allows you to omit the branch path name portion of a version-extended path name (for example, foo.c@@/JOHN_TMP)


Once you have define a lbtype, you can apply (mklabel) it to any file or group of files you want in your current view.
That means you have a view configured to select the LATEST of a branch, and at a given time, you apply this label:

cd /myView/myVob/myGroupOfFile
cleartool mklabel -nc -r MY_LABEL-1.0 .

Note: the name of the lbtype (and the labels set from this lbtype) is entirely up to you. You can set a label FOO, BAR or any other names. Conversely, you can set a label MY_LABEL-2.0, then set a label MY_LABEL-1.2 (not wise, but...).

If you want to see what exact versions are referenced by a previous existing label like MY_LABEL-1.0, you create another (dynamic) view that you set to see this label.
The following config spec ("configuration specifications", aka "selection rules" for versions) will achieve just that:

element * MY_LABEL-1.0
element * /main/LATEST

The second selection rule is called "stop rule" because it allows for all versions to "fall back" to this default rule: if no version (for a given file) is labeled MY_LABEL-1.0, then it will always stop at the "/main/LATEST" rule, to select the LATEST version of the branch main.

For those "consultation" view (i.e. "view that are only used to see versions of files"), I recommend dynamic view, for a quick access to those fixed versions. If you now want to see the 2.0 label, simply modify the config spec of this view. Or create another view, in order to see both 1.0 (in the first view) and 2.0 (in this second new view)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...