IBM Rational ClearCase® is a fantabulous source code revision control software. Renaming an element in ClearCase VOB (Versioned Object Base) is quite simple.
- Checkout the parent directory of the element which is supposed to be renamed.
cleartool co <parent-directory-of-the-element-to-be-renamed>
- Issue the below command to rename the element:
cleartool mv <present-name-of-the-element> <new-name-of-the-element>
- We did not checkout the actual element which is being renamed. This is because, renaming affects the directory listing the not the element itself.
- Checkin the parent directory of the element.
cleartool ci <parent-directory-of-the-element>
Example: Consider a file named myFile
to be renamed to yourFile
located in a directory called sourcecode.
cleartool co sourcecode
cleartool mv sourcecode/myFile sourcecode/yourFile
cleartool ci sourcecode
Moving an element in ClearCase?
The cleartool mv
command can also be used to move an element from one directory to another within the same VOB.
- Checkout the parent directory the element to be moved.
cleartool co <parent-directory-of-the-element-to-be-moved>
- Checkout the directory where the element is to be moved.
cleartool co <destination-directory-of-the-element>
- Issue the
cleartool mv
command to move the element.
cleartool mv <present-path-of-the-element> <new-path-of-the-element>
- An element can be moved as well as renamed with a single command as below.
cleartool mv <present-path-of-the-element> <new-path-of-the-element-with-new-name>
Example: Consider we have to move an element named oldFile
from a directory called parentDirectory
to newDirectory
and also rename it as newFile
.
cleartool co parentDirectory
cleartool co newDirectory
cleartool mv parentDirectory/oldFile newDirectory/newFile
What is a ClearCase VOB?
VOB is an acronym for Versioned Object Base. It is a repository within which ClearCase stores the elements that are under version control. To access the contents of these VOBs, IBM® uses a proprietary networked file system format named MVFS (MultiVersion File System)® for mounting the VOBs as a virtual file system.
Resources:
- IBM Rational ClearCase: http://en.wikipedia.org/wiki/IBM_Rational_ClearCase
- ClearCase Reference: http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.cc_ref.doc/topics/ct_mv.htm
- ClearCase Support: http://www.philforhumanity.com/ClearCase_Support_11.html
- Base ClearCase Cheat Sheet: http://www.ibm.com/developerworks/rational/library/836.html
- ClearCase Best Practices: http://www.highley-recommended.com/sw_process/best.html