Topic
  • 6 replies
  • Latest Post - ‏2013-07-31T14:22:14Z by paunus
paunus
paunus
162 Posts

Pinned topic Exporting/importing between UCM components?

‏2013-07-25T13:57:29Z |

Hey all - been awhile since I had to research this one.

We have elements/history in a UCM project vob component .. and i've been asked to move it all to a brand new project/vob component.

As I recall, using the traditional CC export/import tools, UCM is (still??) not supported. I recall having to use clearfsimport - but this won't retain any history from ClearCase..?

 

What is the recommended method - if any - to get this done (using 7.1.2.11, Win7) ?

 

-Paul

  • Dave-Robinson
    Dave-Robinson
    116 Posts

    Re: Exporting/importing between UCM components?

    ‏2013-07-29T02:11:16Z  

    >>> using the traditional CC export/import tools, UCM is (still??) not supported.

    True. That is the official position, and in most circumstances it just won't work.

     

    Now, if you really want to take elements with history into a new component VOB, you can do as follows.

    I'll assume a "sub-VOB component" as that is a slighlty more problematic use case.

    Do not try to do multiple components at one go.

    The new project VOB / component VOB must NOT share an AdminVOB with the old project VOB / component VOB.

    First, make sure you have a FULLY LABELED baseline to select the files by. This will be the ONLY "legacy" baseline that shall be able to be used as a Foundation Baseline for projects in the new PVOB.

    Create a NON-UCM view (clearexport_ccase / clearimport will not [ever] work in a UCM view), with config spec

    ---------------------------

    element * CHECKEDOUT

    element *  [baseline-label-name]

    element * /main/0

    ---------------------------

    Run your clearexport_ccase / clearimport.

    Now make the imported subtree into a UCM component in the new PVOB

    cleartool mkcomp -root [dir-in-new-cvob]  compname@new-PVOB

    cleartool mkbl -import -c "root baseline for migration from old pvob to new pvob" -component compname@new-PVOB label-type-selector@new-CVOB

     

    Note that the new PVOB should not use any project / stream names that were used in the old PVOB,

     because there will be problems creating / working with associated branch types.

    And the new PVOB shall not support deliver / rebase using any of the migrated labels. The one imported baseline can be used as Foundation when you initially create a new UCM project.

  • paunus
    paunus
    162 Posts

    Re: Exporting/importing between UCM components?

    ‏2013-07-29T13:05:29Z  

    >>> using the traditional CC export/import tools, UCM is (still??) not supported.

    True. That is the official position, and in most circumstances it just won't work.

     

    Now, if you really want to take elements with history into a new component VOB, you can do as follows.

    I'll assume a "sub-VOB component" as that is a slighlty more problematic use case.

    Do not try to do multiple components at one go.

    The new project VOB / component VOB must NOT share an AdminVOB with the old project VOB / component VOB.

    First, make sure you have a FULLY LABELED baseline to select the files by. This will be the ONLY "legacy" baseline that shall be able to be used as a Foundation Baseline for projects in the new PVOB.

    Create a NON-UCM view (clearexport_ccase / clearimport will not [ever] work in a UCM view), with config spec

    ---------------------------

    element * CHECKEDOUT

    element *  [baseline-label-name]

    element * /main/0

    ---------------------------

    Run your clearexport_ccase / clearimport.

    Now make the imported subtree into a UCM component in the new PVOB

    cleartool mkcomp -root [dir-in-new-cvob]  compname@new-PVOB

    cleartool mkbl -import -c "root baseline for migration from old pvob to new pvob" -component compname@new-PVOB label-type-selector@new-CVOB

     

    Note that the new PVOB should not use any project / stream names that were used in the old PVOB,

     because there will be problems creating / working with associated branch types.

    And the new PVOB shall not support deliver / rebase using any of the migrated labels. The one imported baseline can be used as Foundation when you initially create a new UCM project.

    Thank you for this detailled response!

     

    More specifically - and perhaps unfortunately - the old/new vob components, and projects, will in fact share the same PVOB. If I understand from your information that would be a show stopper.

     

    Curious about the 'cleartool relocate' command - is that command not a solution in this case?

  • benray
    benray
    74 Posts

    Re: Exporting/importing between UCM components?

    ‏2013-07-29T13:16:47Z  
    • paunus
    • ‏2013-07-29T13:05:29Z

    Thank you for this detailled response!

     

    More specifically - and perhaps unfortunately - the old/new vob components, and projects, will in fact share the same PVOB. If I understand from your information that would be a show stopper.

     

    Curious about the 'cleartool relocate' command - is that command not a solution in this case?

    That's correct. It is a restriction listed on the relocate man page:

    ==

    relocate cannot be used when pname or target-dir-pname is part of UCM component.

    ==

  • Dave-Robinson
    Dave-Robinson
    116 Posts

    Re: Exporting/importing between UCM components?

    ‏2013-07-29T13:23:58Z  
    • paunus
    • ‏2013-07-29T13:05:29Z

    Thank you for this detailled response!

     

    More specifically - and perhaps unfortunately - the old/new vob components, and projects, will in fact share the same PVOB. If I understand from your information that would be a show stopper.

     

    Curious about the 'cleartool relocate' command - is that command not a solution in this case?

    Correct trying to do that with the same PVOB would be a show stopper.

    And relocate is subject to the same restrictions as clearexport ccase.

     

    1. To create a version on a branch guarded by a UCM stream, you must be in a view of that stream.

    2. When you work in a view of a UCM stream the ONLY branch you can create versions on is the branch guarded by that stream.

     

    Therefore, for these things that are duplicating entire version trees

    1. You must be working in a non-UCM view

    2. The target VOB must see all branches as non-UCM branches

     

    And if you satisfy those conditions at the time of "clearexport_ccase/clearimport" or "relocate -update", but later link that VOB to a PVOB that says it is a UCM branch, then you are creating problems, that you would be on your own to extricate yourself from.

  • GKellner
    GKellner
    259 Posts

    Re: Exporting/importing between UCM components?

    ‏2013-07-31T14:04:14Z  

    What is the goal you want to achieve?

    Do you realy want to duplicate one component to develop with both duplicates?
    Why?

     

    greetings georg.

  • paunus
    paunus
    162 Posts

    Re: Exporting/importing between UCM components?

    ‏2013-07-31T14:22:14Z  
    • GKellner
    • ‏2013-07-31T14:04:14Z

    What is the goal you want to achieve?

    Do you realy want to duplicate one component to develop with both duplicates?
    Why?

     

    greetings georg.

    Thanks for the questions and input - I really appreciate it.

    This is a scenario where, a few projects, and the component within them, were not originally structured correctly - however the team has proceeded/continued to use the project over the last number of years regardless.

    It got to the point where they now need to properly configure the project/component, moving forward.

    More specifically, there are subfolders inside an existing component, which themselves should be entirely separate component VOBs (and thus, new project(s) to go along with it) in order to properly match the requirements for the work being done.

    So, in order to achieve required results, as discussed the choices are:

    1 - just lock up the existing project/stream, make a fresh copy in the new project, and live with the fact there will be a break in history, if we need to go back to older versions, we would have to go back to the old project and view the work there

    2 - find a way to move (or, copy - and again lock up the old project) the data .. perhaps relocate, or whatever way possible, to move the folder structure to the new/proper location, complete with all the past history.

    ..again with this apparent restriction of all above-mentioned proj, components etc, living in the same PVOB.