2

Let's say I have a... ahem, a friend still using1 ClearCase.

This friend happens to have about 100000 files in a directory outside2 of ClearCase. This directory was copied out from the ClearCase VOB/label/whatever it's called, at one point earlier in time. About 4000 of these files are now changed. How would you go about copying these changed files back to ClearCase? The current thinking is "right click on each file one by one on the left, checkout it, then drag the changed file from the right." This could prove time consuming. And mind consuming.

1 The friends' colleagues likes that fact it works just as well as it always has. In fact, ClearCase also works well with new, shiny other IBM Rational products. Also, they most likely would prefer if crazy git lovin' hippies stayed off their lawn.

2 It's actually in git, but I don't expect that to help.

Prof. Falken
  • 24,226
  • 19
  • 100
  • 173

1 Answers1

1

The right tool for this job would be the clearfsimport one.

See for example "How can I use ClearCase to “add to source control …” recursively?"

clearfsimport -preview -rec -nset c:\sourceDir\* </myview/VOB>/label/whatever

With </myview/VOB> being the path of a view (either on windows or Unix, preferably a dynamic one)

# Windows
m:\myView\aVob\whatever

# Unix
/view/myView/vobs/aVob/whatever

The clearfsimport command will detect the files added, removed or modified, and do the checkouts for you.
If you are using an UCM view, set an activity first.

The source from where clearfsimport does that copy can be any regular folder.
You might want to move the .git folder first (if that source is a git repo), in order to avoid importing it by mistake.

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