It's all about the answers!

Ask a question

Clearcase Incremental Export, then Import


Larry McCarthy (2102224) | asked Jun 04 '14, 3:48 p.m.
For RTC 4.0.6, the Version Importer docs on migrating data in increments, finishes with:

"When you run the import commands, they run in the same order as you exported them."

To me, that means I should import the folders into the empty component first, and finally import the root folder. But... I don't think that's correct. If I try to import one of those folder exports using the -f folder-name qualifier on the import, it fails with:

Problem running 'import ccase':
Could not import data to Jazz SCM because of the following error:
Could not resolve 'folder-name' to a folder.

... I guess because the folder doesn't exist. Then, I thought maybe the importer is clever enough to create the folder, so I tried the same import without the -f qualifier. No joy; it put the folder contents all over the top of the component.

So, I'm going to try the import in the reverse order of the export. That is, import the root folder first, then import all of its child folders. Of course, this has to wait until all of the child folders are exported, so that I can then export the root folder ...

Your thoughts? Am I doing this wrong?

Thanks,
Larry.



Accepted answer


permanent link
Masabumi koinuma (46115) | answered Jun 04 '14, 6:03 p.m.
JAZZ DEVELOPER
You're right that it fails because the folder does not exist.
The importer is actually clever enough to re-parent all the previously imported content when you run the second import ;)
For the first import, you can either create a folder and import with -f option, or, you could import into the root folder without -f option. The result after the second import is the same.
Larry McCarthy selected this answer as the correct answer

Comments
Larry McCarthy commented Jun 18 '14, 10:56 a.m.

Thanks, Masa. You're right, of course. It seems, though, that the folder doesn't get created when importing with the -f option. However, I found a "trick". Answer comments don't provide enough room for logs, and examples, so see the next "answer" for the details...

One other answer



permanent link
Larry McCarthy (2102224) | answered Jun 18 '14, 11:40 a.m.
I tried to create the folders by hand in the target component. I ended up with a spurious .project file, which I tried to ignore on delivery and got a spurious .jazzignore file... Argh. The import finally worked, but I was worried that my handmade folders had messed up the component.

Later, (different view and component) I accidentally ran the root folder import first. Of course, that failed. But, from reviewing the import log, the import created all of the folders first (in the import repository workspace), before it discovered the export had been done with --prevDirs. So, after the failed top-level import, the folder-level import works, without having to create any sketchy artisanal top-level folders!

I still haven't tried importing the folder-level export without the -f option, though. That sounds easier :)


Comments
Masabumi koinuma commented Jun 18 '14, 1:13 p.m.
JAZZ DEVELOPER

Ah, that's a nice trick ;)
One alternative is to use RTC Web client to create a folder in a stream. It provides a straight-forward step to create a folder or a file in a stream.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.