How to import the files from folder A to folder B with latest version of folder A

萝らか妹 提交于 2020-01-14 06:50:14

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!