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

How to compare workspaces and get the outgoing changeset content?

 Hi,

I need to compare workspaces and get the outgoing changeset content/patch, so that we can analyze the changeset content later. I am able to accomplish this by using scm commands.

-> compare workspaces to list change sets:
scm --non-interactive --config <configure> compare -I fwbs  -f o workspace <ws1> workspace <ws2> -r <repo>

-> parse above output and check each change set to get the content:
scm --non-interactive --config <configure> diff changeset <id> --workspace <ws1> -r <repo>

The only issue that I have with above cmd is the performance. Each cmd takes about 20 secs to execute. Therefore, if a user has n changesets, that is, 20 * (n+1) secs, which is too slow for my web application. Is there a better way of doing it? Other scm cmd? Will RTC API help in this case? Thanks.

Thanks,
       Lan

0 votes



One answer

Permanent link
Hi Lan,
Have you tried "lscm" command?
Please refer to https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.scm.doc/topics/c_scm_cli.html&scope=null
"For improved performance, you can run the command line using lscm.bat or lscm. This lightweight command line version creates a daemon process on your machine that reduces the startup time and improves the execution time for most commands. "

0 votes

Comments

Thanks for your suggestion, Lily. I tried lscm. It takes about the same time as scm.


I also tried RTC Java APIs, I am able to compare workspaces and list changeset content. (It takes 2 mins in total. I have about 18 changesets in my test.) Now the problem is that I can only get the file content after the change, but how can I get the patch? I would like to get the same output as diff cmd so I can tell which line is changed. Any suggestions? Thanks. 

I'm not familiar with API. I suggest you submit a new discussion for the API usage.

lscm should be faster after the initial login, as the server has to start the TeamPlatform only once.

There are few examples for SCM API here: https://rsjazz.wordpress.com/2013/09/30/delivering-change-sets-and-baselines-to-a-stream-using-the-plain-java-client-libraries/
You also want to look at https://rsjazz.wordpress.com/2013/07/15/boost-your-automation-performance-using-an-automation-server/

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
× 12,019
× 1,381

Question asked: Jan 29 '15, 9:12 a.m.

Question was seen: 4,247 times

Last updated: Feb 06 '15, 2:20 p.m.

Confirmation Cancel Confirm