I merged directories in two different views using clearcase. The directories can have difference in the no. of files and subdirectories.
After merge The listing of files merged on merge manager doesnot match with no. of files
checkedout on to-clearcase view.
ie. lsco on the merged-to view and
No. of files checked out on merge manager(I didn't checkout any files prior to merge operation)
It depends on the history of the two versions of a directory being merged from one branch to another:
if one version has removed files (i.e. has less files than the other version)
if said version is merged onto the other,
the resulting version will have less files than initially shown in the view.
That could be because:
that view is not the one used for the merge
that view is the correct one, but with an eclipsed or hijacked content (privates files replacing versioned files)
In any case, what would help in the mentioned view is:
a 'cleartool ls' in the directory merged
a 'cleartool ls' in the parent directory of the directory merged.
The output of those two commands would help to confirm the exact status of the files merged within that directory, as well as the status of the directory itself.
Related
I am facing a strange problem. My application has 2 folders. They act as 2 features (They are independent modules). Both folders have a file log4j.xml with different configurations.
To create a installer I run heat and candle on both folders and then light them to create an MSI. After installation I see that log4j.xml is same in both the folders. The log4j.xml of the 1st folder is copied to both folders.
Is this an issue or am I doing something wrong ?
I have used three approaches to address this issue in the past:
My Preference:
Restructure the input area (if necessary using MSBuild Copy task or scripts) so that there is a single folder tree (which may reflect how you plan to have the files on the target system). The point of this is to call heat once on a folder tree which has the two sub folders. When there are files of the same name in different subfolders, heat automatically adjusts the related file/component ids.
Alternative:
It sounds like you are using -suid. Not using it will create unique ids.
Alternative #2:
Create a transform to rename the Ids related to one of the similar files.
I need to modify a Simulink project stored under clearcase. From this project I must generate the C code, but this not the problem. The problem is that all generated files (*.c and other) are saved into clearcase and the code generation delete some file without overwrite the old version with new. Fortunately seems only for files different from *.C but in any case under clearcase (I use a windows client) I found in correspondence of deleted file:
the file name
three colored question marks
I think that clearcase has the information regarding the file stored but is not able to allocate this.
Now I need a command/script for CC which help me to found ALL removed files from the view because the project structure is very complex and a manually search is hard.
Thanks for any suggestion
"three colored question" marks means "checked out but removed", as in this example (you can recover from it by reloading the snapshot view)
If an automatic process is generating or deleting files in a snapshot view (it wouldn't be able to do the same in a dynamic view), then you should end up with a bunch of hijacked files (as identified in a snapshot view).
You could check them out and check them in.
For the files that need to be deleted, you can follow "What's the “proper” way to delete files from a ClearCase snapshot?".
But both process are manual and doesn't scale well.
There are two viable options:
1/ Don't version what is generated (you can re-generate it at any time)
2/ If you must version what is generated, then:
generate it outside of the snapshot view
use clearfsimport to import the result of that generation into the snapshot view: that will checkout the right files and will delete the files that are no longer generated.
That would be the right solution for "w I need a command/script for CC which help me to found ALL removed files"
We have a current set up of VOB such that source code and documents reside in the same VOB.
To reduce the VOB download time we now want to move the documents to a new VOB, so that only the code part remain in the old VOB.
Since there are lot of folders and files, its not possible to manually relocate each file/folder.
To do this, we need to write a script which will detect file types by their extension and move file types such as .doc,.pdf, .txt to the new VOB.
VOB server is Windows Windows 2008 R2 Enterprise edition.
I'm a novice!
Can someone help me out with the script?
Thanks
Nush
The process would involve cleartool relocate: see "Relocating elements to another VOB".
The best practice is to:
group all the right elements you want to relocate in one folder (cleartool move)
remocate that folder
It is best if what you want to split is cleanly group is one folder structure.
Note that relocate wouldn't work if you are using ClearCase UCM though.
See this article:
The reason for this restriction is immutable baselines: if an element has ever been in a baseline, it can never be moved to another place; the baseline needs to know where to look for it. So a UCM element really can't be relocated.
I have created some file, in different directories. I couldn't add them when I created, so I need to do it later.
Is there a way to get the list of all the files that are in ClearCase view, that are not actually under source control?
Yes: you can list all your private files with ClearCase, with
cleartool lsprivate (only for dynamic views, not snapshot views)
cleartool ls -rec -view_only
You will need to grep the output for your specific file though.
See "Command to find all view private files in the current directory recursively" for more.
We use both ClearCase UCM and base. One of the open questions we have is, how to find out where the loaded files of snapshot views are reside, by a given path of view storage directory?
e.g. We have a view located in C:\views\myview.vws
Sometimes the equivalent loaded files are in C:\views\myview directory, but sometimes not. I'm looking for a way to find where it is.
I tried to find it out by cleartool lsview -l and cleartool desc - does not help.
The Windows registry does not provide this answer as either (AFAIK).
I confirm there is not information where a snapshot view (UCM or not) actually resides.
You need to realize that by simply copying the .view.dat (hidden) file that you can see at the root directory of any of your snapshot view, you will make the destination directory (in which you copy the .view.dat file) the root of your snapshot view.
Copy it to three different directories, and you have the same snapshot view replicated three times!
Copy it to C:\Windows\System32, and that directory becomes a snapshot view root directory!
You best bet is to search for those .view.dat (or view.dat on Windows): those files contains the uid (unique id) of the view, allowing you to reconcile that with what you see within the view storage.