1

I have a whole big bunch of new files I've recently dropped (via robocopy) into a folder tree. How can I ask ClearCase UCM to identify those files and get them placed under version control?

Jon
  • 1,675
  • 26
  • 57

2 Answers2

1

One easy way is to use clearfsimport in order to do a (recursive) import of a full directory content.
See "How can I use ClearCase to “add to source control …” recursively?".
It does work for ClearCase UCM view as well as base ClearCase view.
You only have to set an activity on the view you are using for the import before executing the clearfsimport.

That is easier than copying those file directly in the ClearCase destination view, and trying to detect those private (i.e. "not yet versionned") files.

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

Ah, turned out someone had already made such a post on an internal blog. Who knew!

I took that and then expanded it

for /f %1 in ('cleartool ls -r -s -nxname -view_only ^| grep -e ^\.\\SRC_ ^| grep -e vcproj$') do @cleardlg -addtosrc -nc "%1"

(Yeah, I've got some unix tools installed, grep and the like).

Looks for all vcproj files in a directory that starts with .\SRC_.

Jon
  • 1,675
  • 26
  • 57
  • 1
    Interesting, and more precise than my answer. +1. The list of private files is similar to one of my old answers: http://stackoverflow.com/a/2099195/6309. Other ways are listed here: http://stackoverflow.com/q/369697/6309 – VonC Feb 28 '13 at 19:33