How can I use ClearCase to “add to source control …” recursively?

后端 未结 10 1589
暖寄归人
暖寄归人 2020-11-22 08:26

I unpacked a zip-file delivery into a clearcase view. Now I want to add the complete file tree to the repository. The GUI only provides an \"Add to source control ...\" for

相关标签:
10条回答
  • 2020-11-22 08:55

    you can get a fix at

    http://www-01.ibm.com/support/docview.wss?ratlid=cctocbody&rs=984&uid=swg21117629

    0 讨论(0)
  • 2020-11-22 08:55

    You can also add this command to your context menu with a small script...

    Ten best Triggers

    edit: oh, sorry. didn't saw that this was already suggested...

    0 讨论(0)
  • 2020-11-22 08:56

    I would rather go with the clearfsimport script, better equipped to import multiple times the same set of files, and automatically:

    • add new files,
    • make new version of existing files previously imported (but modified in the source set of files re-imported)
    • remove files already imported but no longer present in the source set of files.
    • make a clear log of all operations made during the import process.

    So if your 'zip-file delivery needs to be updated on a regularly basis, clearfsimport is the way to go, but with the following options:

    clearfsimport -preview -rec -nset c:\sourceDir\* m:\MyView\MyVob\MyDestinationDirectory
    

    Note the :

    • -preview option: it will allow to check what would happen without actually doing anything.
    • '*' used only in Windows environment, in order to import the content of a directory
    • -nset option.

    From CMWiki, about that 'nset' option:

    By default, clearfsimport is meant to be used by the vob owner or a privileged user, but users often overlook the -nsetevent option, with which it may be used by any user.
    This option drives clearfsimport not to set the time stamps of elements to this of the source file object outside the vob (which requires privileged access).
    There is a minor non-obvious side-effect with this: once a version will have been created with a current time stamp, even the vob owner will not be able to import on top of it a version with an older (as it would be) time stamp, without this -nsetevent option. I.e. once you use this option, normal or privileged user, you are more or less bound to use it in the continuation.

    0 讨论(0)
  • 2020-11-22 08:58

    I agree, find+select+add-to-source-control from Windows explorer is not a good option if the number of files to be version controlled is huge. As already mentioned above, explorer.exe crashes if we try to add a large number of files.

    clearfsimport is the best and the most hassle free utility for this task.

    -GP

    0 讨论(0)
提交回复
热议问题