2

I tried to create a baseline today and ClearCase Explorer crashed (seemed to be after it was finished, but evidently it wasn't.)

I tried to recreate the baseline and it gives me an error saying there are some that are "in_progress" so it can not proceed.

I removed the baseline, and I am trying to remove the "in_progress" label types. When I remove the lbtype, it says that a directory is locked.

I did an lslock -all and removed the locks on a project and a baseline and now there is nothing listed when I do an lslock -all.

I tried to remove the "in_progress" lbtype and it is still saying that something is locked. Is there another way to find out what is preventing it from working?

I know this may be confusing, so if any clarification is needed, I am willing to update my question.

"ct lslock -all"

--09-09T09:47 USER lock project "XXXXXXX" (locked)
"Locked for all users. Project locked for future changes as released."

--09-20T09:56 USER lock baseline "XXXXXXXXX" (locked)
"Locked for all users."

(removed locks)

"ct lslock -all" shows nothing

"rmtype -rmall lbtype:BASELINE_in_progress@\VOB

There are 1228 labels of type "BASELINE_in_progress".

Remove labels? [no] yes

cleartool: Error: Lock (obsolete) on directory element prevents operation "remove label".

cleartool: Error: Unable to remove label type "BASELINE_in_progress".

Rubasu
  • 379
  • 3
  • 14
  • Can you copy the exact error message stating that "something" is locked? – VonC Jul 09 '12 at 13:11
  • SO you have directories which are locked. try lslock i your view, adding the root directory of the component, to check if it detects anything. (http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/index.jsp?topic=/com.ibm.rational.clearcase.cc_ref.doc/topics/ct_lslock.htm) – VonC Jul 09 '12 at 15:03
  • @VonC - I assumed that the '-all' would list all locked files. However, it won't list obsolete files without the '-obsolete' option. Now it lists a LOT of files (under one locked directory) that are locked. Is there a way to do this recursively or another easy way to unlock all of these temporarily? – Rubasu Jul 09 '12 at 15:19
  • 1
    http://www.ibm.com/developerworks/forums/message.jspa?messageID=13758105: you could pipe the result of the lslock to an unlock command in order to unlock sequentially all the obsolete (hence locked) files. – VonC Jul 09 '12 at 15:46
  • 1
    Or you can use find: http://www.ibm.com/developerworks/forums/message.jspa?messageID=14001812 – VonC Jul 09 '12 at 15:47

1 Answers1

2

The actual error message is

possible stranded temporary lbtype name found: "`abaselinexxx.yyyy_in_progress`".

The idea is to:

  • remove all the _inprogress types in the vob(s) involved by the UCM components
$ ct rmtype -rmall lbtype:abaselinexxx.yyyy_in_progress@\\avob
There are 1690 labels of type "abaselinexxx.yyyy_in_progress".
Remove labels?  [no] yes
  • promote the baseline into a fully labelled one:
ct chbl -full -nc baseline:abaselinexxx.yyyy@\apvob

The locks which could prevent those operations to complete are:

  • on the lbtype
  • on the vob (ie the vob itself could be locked)
  • on the pvob (the pvob or one of its admin pvob could be locked)

Few remarks, from the comments:

  • cleartool lslock -all won't display obsolete files ("obsolete" being one form of locking): cleartool lslock -all -obsolete will.

  • to unlock a set of locked files, you have a choice between for and cleartool find -exec commands.

Windows

for /f "delims==" %x in ('cleartool lslock -all -obsolete -fmt "%Xn\n"') do cleartool unlock "%x"

Unix, in view context...

cleartool lslock -all -obsolete -fmt "%Xn\n" | xargs -i{}
cleartool unlock %x

Note that a cleartool find would unlock everything under a certain path.
If you know that path (and all -- or most of all -- its content) is locked, then it can work:

ct find /path/to/a/locked/directory -exec '/usr/atria/bin/cleartool unlock  "$CLEARCASE_PN"'
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • It let me create a new baseline with the same name and promote it to full. However, it is still giving me the errors that something is locked when I try to remove the _in_progress labels. I will update my question with the full errors. – Rubasu Jul 09 '12 at 13:26