It's all about the answers!

Ask a question

Creation of Root Folders when importing from an SVN Dump file


Jason Wilson (311326) | asked Aug 22 '14, 6:44 a.m.
Hello All, I am hoping that someone is able to assist...

I am trying to create new components and populate these with folders/files from and SVN dump file. What I am after though is a structure similar to the following:

Component A
     --> CORE_CODE (root folder)
           --> AJAX (Subfolder)
                 --> FileA
                 --> FileB
           --> CLASSES (Subfolder)
                 --> FileA
           --> etc........

However the import makes the folders AJAX and CLASSES etc. the root folders.

I have tried various obtions but cannot seem to get the structure I require. When I import from the SVN dump I am not able to select the the option for importing the folder as a root as when selecting the option 'Import the selected SVN folders as top_level folders in the target Jazz component' does not allow me to add the folder and it's subfolders to be imported.

SVN structure is as follows:

--> All Projects
      --> Project A
            --> Branches
                  --> Latest Branch (I want to add this folder)
                        --> AJAX (Subfolder)
                             --> FileA
                             --> FileB
                       --> CLASSES (Subfolder)
                             --> FileA

So whatever I seem to do (admitedly this could be wrong) what I actually get is the following:

Component A
     --> AJAX (Subfolder)
        --> FileA
        --> FileB
     --> CLASSES (Subfolder)
         --> FileA
         --> etc........

I hope I have sufficiently explained this and someone is able to assist

2 answers



permanent link
Tim Mok (6.6k38) | answered Aug 22 '14, 1:18 p.m.
JAZZ DEVELOPER
https://jazz.net/library/article/650#Mapping_SVN_folders_to_Jazz_comp

It sounds like you want to map your branch "Latest Branch" to the name "CORE_CODE". You can do this at the start of the import. There is documentation on this in the SVN import article linked above.

An alternative is keeping what you have now but load the component root folder. If you name your component "CORE_CODE" then the default name for the component root folder will be "CORE_CODE". However, the component root folder will not be a share so any changes to its name will not be recognized as a change by SCM.

Comments
Jason Wilson commented Aug 26 '14, 10:09 a.m. | edited Aug 26 '14, 10:10 a.m.

Hi Tim,

Thank you very much for your reply, unfortunately this has not been able to resolve the issue I am having.

We are looking for it to create the top folder, so as the example in the document, we would want (when finally imported) to have a structure for a component to look like the following:

Component A:

CORE_CODE (Folder in SVN and imported)
         --> Ajax
              --> File1
              --> File2
         --> PHP
              --> File1
              --> File2

In SVN it looks as follows:

Project A
     --> Maintenance
     --> R&D
     --> Plugins
     --> Branches
           --> Core_V1.0.0
           --> Core_V1.0.1
           --> Core_V1.2.0 (This is the parent folder we want to import)
                 --> Ajax
                    --> File1
                    --> File2
                 --> PHP
                    --> File1
                    --> File2

When I try and import using the 'Import using the Selected SVN as top-level folders' I am unable to select the folder 'Core_V1.2.0' as the 'add' option is greyed out, instead I can only select the folder 'Branches'.

If I select the 2nd option then I can select the 'Core_V1.2.0' folder, however the import makes all subfolders the top-level folders and this is not what we want.

Again I hope this explains the issue.

Cheers,

Jason.


Tim Mok commented Aug 26 '14, 10:45 a.m.
JAZZ DEVELOPER

Did you try using the mapping as explained in the article? It is set in the initial wizard dialog, not after processing the dump and displaying the folder tree.


permanent link
Winston Enos (33116) | answered Aug 27 '14, 10:48 a.m.
edited Aug 27 '14, 10:48 a.m.
Jason Wilson,

I imported into RTC two other Subversion internal projects a year ago and I remember running into this same issue where the top-level SVN directories wouldn't map as I wanted. I don't believe I got around this but it wasn't a critical thing and we ended up importing the subdirectories at the root since it made more sense anyway in our situation.

Assuming the article Tim Mok posted (which I used) isn't working, you can always just fix it post-import.
1. Import the folders as the tool wants (what you didn't want):
Component A
     --> AJAX (Subfolder)
        --> FileA
        --> FileB
     --> CLASSES (Subfolder)
         --> FileA
         --> etc........

2. Once you are committed and code is checked-in, load the workspace into a sandbox (very important that you select 'Browse the components to select the folders to be loaded' when you Load, then click the component until it shows a checkbox so it loads the component name into the sandbox) and then in the sandbox create your top-level directory 'Core_V1.2.0' and drop a .project in there or some dummy file, checkin then commit.

3. Then move the top-level directories you don't want at the root to under the new 'Core_V1.2.0' directory. RTC moves files with version history, and it doesn't track directory versions (unlike ClearCase.) The trick here is that you can only move files through the Package Explorer view, so you have to have the code loaded in an Eclipse project that you want to move. This article shows you how to do a quick-and-dirty move like this: https://jazz.net/library/article/126/#How_do_I_move_a_resource_to_another_component

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.