clearfsimport does not remove files at the component root dir

孤街醉人 提交于 2019-12-30 07:39:05

问题


I am using this command line to import files into a VOB:

clearfsimport -recurse -rmname -nsetevent -filter <sourceDir>/* <vobComponentRootDir>

Content of sourceDir:

fileA
fileB

Content of vobComponentRootDir before import:

fileC

Content of vobComponentRootDir after import:

fileA
fileB
fileC

fileC is not removed, despite I used '-rmname' option.
I suspect it is because it is at the root of the component

I want to automate this import and have the same content in sourceDir and vobComponentRootDir.

How can I complete this ?


回答1:


The -rmname option that I mentioned in "How to delete file elements by file extension in ClearCase?" for clearfsimport might now always work:

  • "clearfsimport -rmname may not detect removed directories if wildcards are used to specify source directories"
  • "clearfsimport -rmname does not work for files at the root directory"

The second link is relevant here and would explain why fileC remains.

This is working as designed.
The -rmname option only applies to directories and you must be in a vob directory when you run the command.

It is best to not use a full vob as a component, but to use a multi-component vob.

If not possible, then you can try and move the content of vobComponentRootDir in a subfolder (just for the clearfsimport to work): vobComponentRootDir\subfolder.
And move that same content back in vobComponentRootDir once the cleafsimport is completed.



来源:https://stackoverflow.com/questions/28236539/clearfsimport-does-not-remove-files-at-the-component-root-dir

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