VOB ClearCase Validation Branch

I'm new to CC and I come from Git and Mercurial, which is perhaps why ClearCase confused me so much. I was assigned the task of migrating the latest CC versions to Git. The problem is I haven't been able to checkout any branch other than the main one in CC.

I have a view that displays the entire revision of VOB / main / LATEST. I am assuming the master branch is the latest revision.

element * CHECKEDOUT
element * /main/LATEST

      

Now I need to get a list of other branches in a specific VOB. To do this, I navigate from terminal to this folder and run

cleartool lstype -kind brtype -invob /%VOB_NAME%

      

and I see a list of branches. Correct me if I'm wrong, but I'm guessing it only displays VOB related branches (% VOB_NAME%).

Now I need to checkout branches. What is the standard way to do this. I tried updating the config with something like:

element * /%VOB_NAME%/%BRANCH_NAME%/LATEST but it doesn't seem to work.

      

Pretty sure I'm not doing it right. Also for migration purposes I will need to automate the steps to fetch branches and checkout branches. I am guessing that updating the spec configuration to switch a branch to a view takes a while and is probably an asynchronous operation, so is there a way to determine when the view finishes updating?

Or maybe there is a command line option to switch branch for a specific VOB in the view?

So, in short, here are my questions that I am struggling with:

Than

  • Am I getting VOB branches correctly?
  • How can I checkout a specific branch?
  • Is there a way to determine if the checkout is ending?

thank

UPDATE

ok I tried @ VonC's recommendation, so my config looks like this:

element * CHECKEDOUT
element * .../heine_1/LATEST
element * /main/LATEST

      

If I guessed correctly, one branch containing a VOB named heine_1 should checkout that particular branch, the rest of the VOBs remain on the master branch, but they are not. When I run cleartool ls

inside this VOB, it is still on the master branch. All folders are marked Rule: /main/LATEST

. So I think it didn't switch the branch.

thank

+3


source to share


1 answer


There are several questions in the original question and comments.

First a configspec problem ...

Element rule syntax: element {path} {version rule} {optional clauses}

If you want a VOB specific rule, you can do something like this: element \myvob\... ...\myvobbranch\LATEST element \myvob\... \main\LATEST -mkbranch myvobbranch

"..." on the way means "this place and everything below it." The "..." in the "version rule" means the branch name is at the end, so it will match / main / myvobbranch / LATEST, / main / br1 / myvobbranch / LATEST, etc.

If you are working on a branch, you usually want new files or work to appear on the branch you are working on, and the second line does that.



Everything in configspec is case sensitive, so keep in mind that "LATEST" is not "last."

Since the view was created for you, I'm pretty sure this is a dynamic view. If it's mapped to disk, it's definitely dynamic. If you need to know for sure, you can burn a CD to a "workspace" of your own kind and run "cleartool lsview -pro -full -cview" and look at the "signs" line. The live preview line will look like this:

Properties: dynamic readwrite shareable_dos

      

For direct questions:

  • Yes, you are getting the list of branches correctly.
  • By default, checkout is done using the version selected in the view, you can use cleartool checkout -branch {full branch path} {file name}

    to check out the latest in a branch, or cleartool checkout -version {version id} {file name}

    to check out a version other than the latest in a branch. I would not recommend normal practice either. -branch will force checks to branch to the parent branch of the element. In -version, you need to add a requirement to perform the merge to complete the checkout, which will also go to the parent version branch.
  • Completion ends when the command completes.

The big "new user password" is that directories are also versioned objects. If you are adding files to the original control, you need to remember to check the directory so that they can be seen by others with similarly configured views. ClearCase GUIs have this behavior by default if you start the process with a NOT directory, but not if you explicitly checked the directory beforehand.

-1


source







All Articles