Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recursive checkin using Clearcase

Tags:

clearcase

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 manually checking in each file.

like image 243
SNA Avatar asked Jun 10 '09 06:06

SNA


People also ask

What is checkin in ClearCase?

In a dynamic view, checkin deletes each view-private, checked-out pname file after using it to create a new version. In a snapshot view, checkin uses the checked-out pname file to create a new version, then loads the checked-in version into the view.

How do I remove a reserved checkout in ClearCase?

TO UNRESERVE A RESERVED CHECKOUT (recommended approach)cleartool unreserve -view hostname:C:\ccweb\{USERNAME}\{END USER'S VIEW}\view. stg C:\ccweb\{USERNAME}\{END USER'S VIEW}\{VOBTAG}\directory\filename cleartool: Warning: This tool should not be used to access a Web View.

How do I make a folder in ClearCase?

The mkdir command creates one or more directory elements. (Operating system directory creation commands create view-private directories, not elements.) Unless you specify the –nco (no checkout) option, the new directory is checked out automatically.


1 Answers

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
like image 96
VonC Avatar answered Sep 18 '22 15:09

VonC