I have a file that i want to add to sourcecontrol on linux using cleartool
.
I've followed the IBM documentation for this, i've tried this:
cleartool mkelem testScript.sh
I got an error: Can't modify directory "." because it is not checked out. I also would like to know how can i checkout/checkin files or directories and setting activities.
You can add files or directories to source control at any time. To add view-private files and directories to source control, or to make placeholders for nonexistent files and directories: Go to the view used for your development task. The version-selection rules of your view determine the branch on which the first version of the element is created.
For snapshot views, the path from which you add to source control does not need to be loaded. However, it must match the VOB namespace. Check out the parent directory element by entering cleartool checkout -nc directory-name.
Checkout directory (.), copy file and add it to clearcase control. Then check-in directory. Directory needed updating to reflect change to its contents. Note that new files added to the directory can not be viewed by others until the directory is checked in. Example of adding all files to Clearcase control: ct mkelem -ci -nc *
Use the -nc option because appropriate comments are appended when you modify directory elements. After you add elements, check in the parent directory so that the elements are visible to others in the directory. cleartool checkin -nc . By default, when you add an element, it remains checked out.
You need to checkout the parent folder first.
cd /path/to/file/
cleartool mkact newfile
cleartool checkout -c "add file" .
cleartool mkelem testScript.sh
cleartool checkin -nc
The cleartool mkact
would work if you are in an UCM view.
It will create and set a new activity, which will record the files and folder you will modify.
Here, the new activity newFile will record the new version of the parent folder, as well as the version 0 and 1 of the file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With