Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
205 views
in Technique[技术] by (71.8m points)

Creating a new subdirectory structure in ClearCase?

I'm a ClearCase newbie and up until now have been used to SVN. Therefore, I'm a bit confused on the steps I need to take to create a new directory structure containing multiple files to ClearCase.

So, say for example there is an existing directory structure within ClearCase as follows:

ParentDirectory
    ChildDirectory1
        File1
        File2
    ChildDirectory2
    ChildDirectory3
        File1
    ChildDirectory4

If I want to add a new subdirectory to this structure, ChildDirectory5, which will contain a number of other files, how do I go about this? From what I have been reading, I will need to first of all check out the parent directory and then use the mkelem command to make each subdirectory and file.

However, I have already created the necessary files and directories on my local machine so I just need to check them into ClearCase somehow. With SVN, all I would've needed to do was copy the parent folder into a checked out repo and do an add & commit command sequence on it.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

As explained in How can I use ClearCase to “add to source control …” recursively?, you have to use clearfsimport which does what you are saying (checkout the parent directories, mkelem for the elements)

clearfsimport -preview -rec -nset c:sourceDirChildDirectory5 m:MyViewMyVobParentDirectory

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 (see my previous answer about nset).

I would recommend dynamic view for those initialization phases where you need to import a lot of data: you can quickly see what your view looks like without making any update (like "without updating your workspace"):
ClearCase allows to access the data in two ways:

  • snapshot view (like a SVN workspace, except all the .svn are actually externalized in a view storage outside the workspace)
  • dynamic view: all your files are visible through the network (instant access/update)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...