1

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:

  1. the file name
  2. 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

H2O
  • 153
  • 1
  • 1
  • 13
  • "I could found this files with a "find checked out", right?" Do you mean you couldn't? Do you see a checked out version when doing a version tree on one of those files? – VonC May 25 '15 at 13:29
  • I means that if an object that in clearcase has "three colored question marks" is an object "checked out but removed", then I can write a simple script which explores recursively my project tree and finds the object in checked out state. After I should just after analyzing the result of the script and find what is really in check out and what is in "checked out but removed" – H2O May 26 '15 at 14:38
  • You could do such a script: all you need to look for is checked out (`cleartool lsco`) files which are not present in the snapshot view on the disk. – VonC May 26 '15 at 15:29

1 Answers1

1

"three colored question" marks means "checked out but removed", as in this example (you can recover from it by reloading the snapshot view)

http://www-01.ibm.com/support/docview.wss?uid=swg21232033&aid=7

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"
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250