Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Is there an 'Import existing project' command in scm? - I will use it after scm load.

In RTC, when you create/load a workspace for a specific stream. It is automatically displayed in the project explorer and is already shared to the jazz source control.

My problem:

I have a created a script to load a stream into a workspace. However it does not automatically import the downloaded files and share it to jazz source control. Therefore, I have to manually do it in RTC by:

File > Import > Import Existing projects. Then after the projects are displayed in project explorer. I will share it in the Jazz source control.

This is the script of scm load in my .bat file.

%scmPath% load -r %repository% %targetworkspace% %localWorkspace% --all -q -f -i

So basically the workspace is already created in RTC but I have not load any components inside it. It is empty. The script will load all the components but it is not in the project explorer and not shared too.

0 votes

Comments

Any solution so far? I met the same problem, the project is in local file system but not in Eclipse project.

As discussed below, this is not part of the SCM command line - it can't be, because that runs outside of Eclipse. The RTC Eclipse client obviously has these kinds of operations. You could look into the Load wizard to find what goes on.

Manually you can

  1. Import the project (using the import existing project wizard)
  2. Stare the imported project
This pretty much does what you want.

@Ralph Schoon
Thanks for reply. I'm using a pure command-line environment for automation - that is why I cannot use GUI for project import. The scenario is: load all the sources (scripts/test artifacts) from remote repository, and then run it automatically. The problem I met for now is: I can load project to local file system but it is not shown in project explorer. I know it is not RTC problem, the reason I'm asking here is: In GUI, there is an option (default) say "Load and create Eclipse....." which is good for me, but for the command "/opt/IBM/SDP/scmtools/eclipse/lscm load -r MyRepo -i -f MyWorksapce MyComponent", it is using the third option(in red line), so I have to find a way to import local files to an 'Eclipse' project else my next step will not started successfully. Thanks again!

This all just does not make any sense to me. If you are running automation in RTC, then you can basically use the RTC Client SDK - the wizards you show above and you are done.

If you run outside of Eclipse, there is no relationship to the Eclipse client at all and you don't need to import it.

If, in fact, you are running your automation from within Eclipse, then you need to look into the Eclipse API and/or RTC Client SDK to find how it does the load steps you want.



2 answers

Permanent link
Hi John,

I am not sure what you are asking. However, the data shows up in the Eclipse project explorer because there is a .project file. Eclipse only recognizes anything as project if there is such a file in the root folder. That is why loading a folder in RTC produces such a file. You can by the way put it on the ignore list while sharing and it will not be shared,but always created when loading.

I am not sure which API to use to import and create the .project file. That is most likely Eclipse API and not RTC API.

0 votes

Comments

Hi Ralph,

I have this scm script that loads a workspace which is similar to creating a workspace of a stream in RTC. The difference was that the scm load command does not import the projects in Project Explorer.

I have to manually do 'File > Import > Import Existing projects' and then select all the component folders that were downloaded using scm load.

I'm asking if it is possible to do the import thing in scm. This is for automation of loading a workspace completely.

Thanks for the reply.

Hi John,

as far as I can tell, the problem you are having is because the scm command line does not interact with Eclipse at all. So it loads the data, but Eclipse does not recognize that. I don't know what to do here.

What I would look at is as follows: You could look into launching your script from within Eclipse and you could look into Eclipse's ExternalProjectImport.class to find out what Eclipse does to see the project.

I'm not quite sure why you want to automate the loading with a script then import it into the Eclipse client. It would be helpful if you can explain the reason behind doing things this way. There might be a better way to do what you want.

There is a daemon that runs when you start the Eclipse client and you can have your CLI use that daemon. Then you can run your load and it will show your repository workspace in the Eclipse Pending Changes. However, you still have to import your projects and connect them to the repository workspace.


Permanent link
Is there a reason you want to load using the script? If you load from the Eclipse client, it will do what you want when loading instead of breaking it up into the steps of loading from CLI, importing into Eclipse, and connecting to your repository workspace.

You may want to look into load rules if you are trying to load your shares in special ways. This may be what you want instead of using the CLI to load.

https://jazz.net/library/article/1015

0 votes

Comments

Hi Tim,

Our project is using RTC 3.0. The main reason of creating this script is that we had an issue before with Developers loading simultaneous workspaces. It caused the RTC connection to slow down heavily so the whole project got affected.

So I propose to automate a load script that will be done during off-work hours. I don't know why the project would not allow to leave RTC open while the computer is locked and load it at night. I have to ask for it.

P.S. I just started using RTC 2 months ago.

I'm not sure what you mean by simultaneous loading. Is everybody loading a workspace at the same time? And what kind of issue are you running into when users try to load in the Eclipse client and then leave the computer locked for the night?

Another useful bit of information is how many users do you have plus what their connection is like to the server. You can check connection status by going to Window > Preferences > Jazz Source Control and enabling the metronome. This will display the metronome in the bottom trim of the Eclipse client. You can open it by clicking on it and running a connection test from the Connection tab of metronome. The test will get the client's ping to the server and run some file transfer tests.

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 1,204
× 411
× 113

Question asked: Jan 14 '13, 1:49 a.m.

Question was seen: 5,856 times

Last updated: Oct 23 '14, 3:40 a.m.

Confirmation Cancel Confirm