Archives For clearcase

One of the projects I’m working on uses ClearCase.
I am developing on Windows 7, with cygwin.
I edit in Vim.

To get integration between Vim and ClearCase, I’m using the ccase.vim plugin.

However, I need to make a couple of changes to the default to get it to work.

  1. In my _vimrc file, add this: set shell=C:/cygwin/bin/bash
  2. In ccase.vim, replace all of the lines that look like this:
    let l:file = resolve (expand("%:p"))
    to:
    let l:file = resolve (expand("%:p:gs?\\?/?"))

I didn’t have to do that on the XP machine I was using before.
I don’t know what’s different.
But the above steps fix it.

This is a common thing I have to do.

Label stuff with a new label.

What stuff?

Everything from my current directory down using my current config spec.

Here’s the code

[bash]
cleartool mklbtype -nc ‘my_new_label’
cleartool mklabel -recurse ‘my_new_label’ .
[/bash]

mklbtype : create a new label

mklabel: apply label

cleartool obsolete all my branches

Brian —  February 9, 2012 — 1 Comment

I want to go through all of the work package branches that belong to me in a particular vob and mark them as obsolete.

These are development branches that I don’t need anymore, and would rather not see in the default version tree.

My solution below works because I name all of my development/work package branches with a particular prefix.

Let’s say my prefix is dev_userName.

So, here’s the command.

[bash]
alias ct=’cleartool’
for b in $(ct lstype -kind brtype -short | grep dev_usrName)
do
ct lock -obsolete brtype:$b
done
[/bash]

I’m using ‘cleartool describe’.
Passing in a format of ‘%l’ to just grab labels.
The sed portions strip off the parentheses and all but the first label.
Labels are ordered newest to oldest.
[bash]
cleartool describe -fmt ‘%l’ my_file_name.txt | sed ‘s/,.*//;s/(//;s/)//;’
[/bash]

This is related to finding clearcase checkins since a given date.
Find all of the checkins between two labels.

ct find . -name '*' -version 'version(\main\LATEST) && !lbtype(FIRST_LABEL) && lbtype(SECOND_LABEL)' -print