Question & Answer
Question
How can the name of an IBM® Rational® ClearCase® element be determined from its source container path?
Answer
Find the element name from a source container path
Using the dump command to find the container of an element
Note: The examples and paths below are Microsoft® Windows® specific; however, the concept and the commands are the same on UNIX® and Linux®.
FINDING AN ELEMENT NAME FROM A SOURCE CONTAINER
When an error message references a source container path, it is difficult to determine which element the log is referring to.
Example:
"\\host1\ClearCase_storage\VOBs\DemoVOB.vbs\s\sdft\29\19\0-12227c71742f4ce99dd5100e96a0b54b-mg"
In order to determine the element name within the VOB to which the path references, you will need to run the describe command using pieces from the path above:
- The name of the VOB is needed.
\0-12227c71742f4ce99dd5100e96a0b54b-mg
- The file that contains the source is the last part of the path to the source container:
\0-12227c71742f4ce99dd5100e96a0b54b-mg
- The part of this file name between the hyphens is the oid (Object ID) which is needed:
If you run "cleartool describe -long oid:<oid>" on the oid while set in a view to the root of the VOB to which the element resides (in our example DemoVOB), the output will return an element name:
M:\default_view\DemoVOB>cleartool describe -long oid:12227c71742f4ce99dd5100e96a0b54b
version "M:\default_view\DemoVOB\tweedledee.txt@@\main\1"
created 27-Sep-04.14:21:23 by jdoe.Domain Users@host1
Element Protection:
User : DOMAIN_1\jdoe : r--
Group: DOMAIN_1\Domain Users : r--
Other: : r--
element type: text_file
predecessor version: \main\0
Hyperlinks:
Merge@125@\DemoVOB <- M:\default_view\DemoVOB\tweedledee.txt@@\main\testing\1
Note: Running the describe command outside of the VOB will NOT return an element name:
C:\>cleartool describe -long oid:12227c71742f4ce99dd5100e96a0b54b@\DemoVOB
version "12227c71742f4ce99dd5100e96a0b54b@@\main\1"
created 27-Sep-04.14:21:23 by jdoe.Domain Users@host1
Element Protection:
User : DOMAIN_1\jdoe : r--
Group: DOMAIN_1\Domain Users : r--
Other: : r--
element type: text_file
predecessor version: \main\0
Hyperlinks:
cleartool: Warning: Unable to determine view for "oid:12227c71742f4ce99dd5100e96a0b54b@\DemoVOB".
cleartool: Warning: Unable to determine view for "oid:12227c71742f4ce99dd5100e96a0b54b@\DemoVOB".
Merge@125@\DemoVOB <- <object not available>
Note: Running the describe command (even in the VOB) with the VOB designation (@<vobtag>) at the end of the oid will NOT return an element name:
M:\default_view\DemoVOB>cleartool describe -long oid:12227c71.742f4ce9.9dd5.10:0e:9
6:a0:b5:4b@\DemoVOB
version "12227c71.742f4ce9.9dd5.10:0e:96:a0:b5:4b@@\main\1"
created 27-Sep-04.14:21:23 by host1.Domain Users@host1
Element Protection:
User : DOMAIN_1\host1 : r--
Group: DOMAIN_1\Domain Users : r--
Other: : r--
element type: text_file
predecessor version: \main\0
Hyperlinks:
Merge@125@\DemoVOB <- M:\default_view\DemoVOB\tweedledee.txt@@\main\testing\1
FINDING THE SOURCE CONTAINER FROM AN ELEMENT
The reverse technique may also be helpful. Using the undocumented DUMP command will help to identify the source container for a specific element:
M:\default_view\DemoVOB>cleartool dump tweedledee.txt
tweedledee.txt (12227c71.742f4ce9.9dd5.10:0e:96:a0:b5:4b)
M:\default_view\DemoVOB\tweedledee.txt@@\main\1
oid=12227c71.742f4ce9.9dd5.10:0e:96:a0:b5:4b dbid=124 (0x7c)
mtype=version
stored fstat:
ino: 0; type: 1; mode: 01
usid: NOBODY
gsid: NOBODY
nlink: 0; size: 21
atime: Wed Dec 31 19:00:00 1969
mtime: Mon Sep 27 14:21:23 2004
ctime: Mon Sep 27 14:21:23 2004
returned fstat:
ino: 111; type: 1; mode: 0444
usid: NT:S-1-5-21-141845252-1443263951-584457872-3387
gsid: NT:S-1-5-21-141845252-1443263951-584457872-513
nlink: 1; size: 21
atime: Mon Sep 27 14:21:23 2004
mtime: Mon Sep 27 14:21:23 2004
ctime: Mon Sep 27 14:21:23 2004
master replica dbid=3
idstr="\main\1"
elem=111 branch=112 ver num=1
cont dbid=536871176 container="29\19\0-12227c71742f4ce99dd5100e96a0b54b-mg"
source cont="\\host1\ClearCase_storage\VOBs\DemoVOB.vbs\s\sdft\29\19\0-12227c71742f4ce99dd5100e96a0b54b-mg"
clrtxt cont="\\host1\ClearCase_storage\VOBs\DemoVOB.vbs\c\cdft
\1f\3d\12227c71742f4ce99dd5100e96a0b54b"
hyperlinks to object:
arrow=125
type=24
hlink vob=a50f450d.224f4a2e.ac15.3e:d7:1d:6f:d0:7d
hlink obj=7f10f560.ace54f3d.9a58.b1:80:b8:88:4e:97
from vob=a50f450d.224f4a2e.ac15.3e:d7:1d:6f:d0:7d
from obj=29a719c6.e9ba47be.900f.c3:52:61:29:02:bf
to vob=a50f450d.224f4a2e.ac15.3e:d7:1d:6f:d0:7d
to obj=12227c71.742f4ce9.9dd5.10:0e:96:a0:b5:4b
Special Consideration
This procedure does not always work as expected.
For example, if the last command executed on an element is a cleartool rmver, then the source container of one of the delta element types will have the oid of the removed version. A cleartool dump or cleartool describe will then result in the message not a vob object.
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21234502