Recursive checkin using Clearcase

前端 未结 3 1411
太阳男子
太阳男子 2020-11-30 09:14

I want to check in a directory and all the sub-directories into the clear case. Is there a specific command to achieve it? Currently I am going into each directory and manua

相关标签:
3条回答
  • 2020-11-30 09:50

    did you used -recurse option in the clearfsimport command. Example: clearfsimport -recurse source_dir .

    This should help. If you're using the Windows client, right-click on the parent folder, select Search, leave the file name field empty, click Search, select all the files in the result window (ctrl-A), right-click on them and select ClearCase -> Add to Source Control

    0 讨论(0)
  • 2020-11-30 10:01

    If you are in windows you may try,

    for /f "usebackq" %i in (`cleartool lsco -cview -me -r -s`) do cleartool ci -nc %i
    
    0 讨论(0)
  • 2020-11-30 10:05

    I would recommend this question:

    Now the problem is to checkin everything that has changed.
    It is problematic since often not everything has changed, and ClearCase will trigger an error message when trying to check in an identical file. Meaning you will need 2 commands:

    ct lsco -r -cvi -fmt "ci -nc \"%n\"\n" | ct
    ct lsco -r -cvi -fmt "unco -rm %n\n" | ct
    

    (with 'ct being 'cleartool' : type 'doskey ct=cleartool $*' on Windows to set that alias)


    But if by "checkin" you mean:

    • "enter into source control for the first time"
    • "updating a large number of files which may have changed on an existing versionned directory"

    I would recommend creating a dynamic view and clearfsimport your snapshot tree (with the new files) in the dynamic view.

    See this question or this question.

    the clearfsimport script is 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.

    :

     clearfsimport -preview -rec -nset c:\sourceDir\* m:\MyView\MyVob\MyDestinationDirectory
    
    0 讨论(0)
提交回复
热议问题