3

I have to copy a large number of files from one view to another view in clear case. The file names to be copied will be given as input. Any ideas how to achieve this through script?

Thanks, JP

2 Answers2

0

The easiest way is to use clearfsimport.
See for instance "How to add all the files in a folder to source control via cleartool command?".

The trick with clearfsimport is that it will import any files within a given folder, without caring about the nature of said source folder.

So if you import from a folder which is from a (source) ClearCase view, clearfsimport won't care, and will import it to whatever destination ClearCase view you want.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

Your question isn't very clear about what you're trying to accomplish.

If your source files are versioned elements and you want to put them as versioned elements in the destination view (on a different branch), then you should use the merge (or findmerge) command. for example, in the destination view, run findmerge -ftag src_view -merge.

If you just need to "see" some versioned files from the source view in your destination view, you can label your source files and add a rule to the destination view config spec (no copy involved).

If you're trying to move non-versioned files, you can use cp or mv through the /view/ extension ala: cp /view/src_view/files /view/dst_view/files

dchev
  • 1