| ClearCase Faq |
| Written by Tushar Patil | ||||||
|
1. How do I find all view private files in my view? cleartool ls -r -view_only This restricts the listing to objects that belong logically to the view: view-private files, view-private directories; checked-out files. 2. How do I find all view private files in my view with a particular pattern? cleartool ls -r -view_only | find ".java" 3. How do I find all files on my private branch? cleartool find -all -version "version(.../private_branch/LATEST)" -print For more information run "cleartool man find" from the command line. 4. How do I find the all file elements under a directory? cleartool find . -type f -print 5. How do I find all sym links under a directory? cleartool find . -type l -print 6. How do I find all checkouts on a specific branch? From Clearcase Explorer if you have a view that is referencing the branch right click on the view name and click "Find Checkouts". From the command line (within a VOB/view context - the view does not have to reference the branch): cleartool lsco -brtype branch_name -r -l cleartool lsco -brtype branch_name -r -l -cvi (checkouts which are in the current view only) cleartool lsco -brtype branch_name -r -l -me (only my checkouts) For more information run "cleartool man lscheckout" from the command line. 8. How do I see the changes made to a branch between two specific dates? From the command line cleartool find -all -ver "brtype(branch_name) && created_since() && !created_since(" -print e.g. cleartool find -all -ver "brtype(test_3.1_main) && created_since(12-Dec-03.01:00) && !created_since(30-Dec-03)" -print and created by Mark: cleartool find -all -ver "brtype(ep_3.1_main) && created_since(12-Dec-03.01:00) && !created_since(30-Dec-03) && created_by(Mark)" -print 9. How do I find all changes made on a integration branch since the last release? If the label associated with the last release it known then run the following command in a view context. cleartool find -all -ver "version(.../integration_branch_name/LATEST) && !lbtype(LABEL_NAME) && !version(.../integration_branch_name/0)" -print e.g. cleartool find -all -ver "version(.../test_5.1_main/LATEST) && !lbtype(TEST_5.1.0.0) && !version(.../test_5.1_main/0)" -print 10. How do I find the differences between two labels? From the command line in a view context run the following command: cleartool find -all -ver "lbtype(LABEL1) && !lbtype(LABEL_2)" -print 11. How do I find all file elements with zero length in my view? cleartool find -all -cvi -nxname -type f -print | ccperl -ne "chomp; print qq($\n) if -z ($); " 12. How do I see all recent modifications to a VOB ct lshistory -all -since -user since a certain date by all users of the VOB ct lshistory -all -since 12-Jan-05 since yesterday by all users of the VOB ct lshistory -all -since yesterday list only those modifications made by mark (note userid is case sensitive): ct lshistory -all -since yesterday -user mark
13. How do I find checkouts by a single user? For an individual Right click on the VOB name in Clearcase Explorer > History From the toolbar select File> Open > Go to any view directory > Select> From the first pull down menu on the toolbar select the user's private branch. 14. How do I set my config spec to look at elements with a particular label? Set your config spec to look like this element * CHECKEDOUT element * LABEL_NAME -nocheckout element * /main/0 Line 1: Select any checkouts in my view. This line is always required by clearcase even if you do not plan to checkout any elements in the view. 15. How do I find all elements associated with a label? Run the following from within a view cleartool find -all -version "lbtype(MY_LABEL)" -print 16. What are reserved and unreserved checkouts? In some version-control systems, only one user at a time can reserve the right to create a new version on a branch. In other systems, many users can compete to create the same new version. Rational Clearcase supports both models by allowing two kinds of checkouts: reserved and unreserved. With a reserved checkout, a checkin of version 3 creates the latest version on the branch, version 4. With an unreserved checkout, the first checkin creates the latest version on the branch, version 4. But a subsequent checkin of version 3 is blocked until the user merges the latest version, version 4, with the checked-out version. When Rational Clearcase loads a file element into a snapshot view, it applies the file system read-only attribute to the file. If you change this attribute and modify a loaded file without checking it out, Clearcase considers the file hijacked. Only loaded files can be hijacked; view-private files are not under Clearcase control and you can modify them without involving Clearcase. Directories and Hijacking 18. How do I find hijacked files in my snapshot view? In CC Explorer right click on the view name and select "Find Modified Files" Under "Details" check "Display results when closed". When finished a View Update Window will appear with details of any hijacked files. 19. How do I compare a hijacked file to the version in the VOB? In the right pane of the Snapshot View Update window, right-click a hijacked file. 20. How do I check out a hijacked file/save the changes made to a file while hijacked? To keep the modifications in a hijacked file, check out the file: 21. How do I undo a hijacked file? If, for specific hijacked files, you want to discard your changes and get a fresh copy of the version from the VOB, you can undo the hijack. 22. How does Clearcase determine if a file is hijacked? To keep track of file modifications in a snapshot view, Clearcase stores the size and last-modified time stamp of a loaded file (as reported by the Windows file system). Clearcase updates these values each time you check out a file, check in a file, or load a new version into the view. 23. What does "Checked out but removed" mean? SYMPTOM: In Clearcase Explorer, I see a file with coloured questions marks next to it. When I hover over it, it say's "Checked Out but Removed".
ANSWER:
"Checkedout but removed" indicates that a file is recorded as having been checkedout by the VOB database, but that its corresponding view private file was subsequently removed.
This usually happens because the file (FILE1) is actually a symlink to another file (FILE2), which is checked out.
If this is the case
When FILE2 is checked out, Clearcase copies a view private copy of the checked out file to the file that was checked out (FILE2 in this case). However, because FILE 1and FILE2 in reality reference the same internal storage element, Clearcase therefore thinks that FILE1 has been checked out (which is correct) and removed (which is technically correct, since Clearcase did not copy a view private version of the checked out file to FILE1).
RESOLUTION: Right click on the element name> Symlinks > Symlink Target Operations Checkin or uncheckout the target element.
If the element is not a symlink then one way to recover from this is to do a 'cleartool unco'. The other way is to copy a file with the same name into that directory. Note that any work on the checked out copy of the file cannot be saved, because there was no view private copy of the file in which the contents were stored.
Powered by !JoomlaComment 3.26
3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved." |





