问题
In clearcase v9.0.1.5, I need to import files from folder A to new folder B with the latest version of A.
Meaning: the ClearCase versions of files in B should be same as that of A:
if file version in A is 4 then after import the version of that file should show as 4 in B.
Is there any possibility to perform this ?
回答1:
You can easily use clearfsimport to import flat files to a branch in one command. That will duplicate the files from A to B, versioning them again in B.
But that won't duplicate the version number, which entirely depends on the history of the branch.
You can use cleartool checkin -identical to force an element to increment its version number on its branch.
回答2:
If folders A and B are in the same VOB, you can hard link the files together, but that will have issues with checkouts in dynamic views. You could also create use symlinks.
If A and B are in separate NON-UCM VOBs,you can use clearexport_ccase and clearimport to copy the elements.
Another option for non UCM VOBs is to use relocate -update to copy the files. This clones the relocated elements completely, down to their OIDs. If A and B will be used in the same audited build, you probably dont want to do this as some directory OIDs may get cloned too, and directory element OIDs are used heavily in build audits.
For UCM component VOBS, you may have to DIY it using scripts. "Cleartool checkin -from" may help here.
来源:https://stackoverflow.com/questions/59627518/how-to-import-the-files-from-folder-a-to-folder-b-with-latest-version-of-folder