It's all about the answers!

Ask a question

Handling changeset

Yohko Tanaka (10523139) | asked Nov 20 '12, 8:43 p.m.
edited Nov 20 '12, 8:44 p.m.

I have 2 questions.

1. Is there any way to know changeset id within eclipse client?
I know I can get it by using scm command(scm status), but I'd like to get it in an eclipse client.

2. Is it possible to extract all the files associated to the changeset?
When I use scm command(scm extract), I need to specify the path for each file.
I'd like to get all the files in the changeset in one operation.

I't be great if someone could give me any ideas.

Thank you in advance.

Accepted answer

permanent link
Chris McGee (50511117) | answered Nov 20 '12, 9:20 p.m.
The changeset ID shown in the SCM CLI is unique to that particular client and not available in the eclipse client. This ID cannot be shared with other users because the numbers are generated on-demand for a particular user for their CLI sessions. For example, the same changeset could have ID 1022 for me while it is 1010 for you.

It is possible to get the UUID of the changeset from the eclipse client, which can be used in the CLI and can be shared with other users. If you right-click on a change set and choose "Copy URL." the UUID is embedded in the URL:

This UUID can be pasted into a CLI command in any place where an ID is used.

I am not aware of a single command that can extract the contents of all files in a change set but I believe it could be scripted using a combination of the following commands:
lscm list changes <changeset ID/UUID>
lscm list states <changeset ID/UUID> <item ID of file from list changes>
lscm extract file <item ID of file> <state from list states> <output_file_to_dump_contents>
Yohko Tanaka selected this answer as the correct answer

One other answer

permanent link
Yohko Tanaka (10523139) | answered Nov 20 '12, 11:14 p.m.
Hi Chris,
Thank you for the quick reply.
I didn't know that changeset ID is generated on-demand, and I understand that I need to use uuid for this purpose.
I also thank you for the scripting idea, this is a great help.

Thank you.

Chris McGee commented Nov 29 '12, 2:48 p.m.

Hi Yohko, if you liked this answer can you click the "thumb up" button on it?


Your answer

Register or to post your answer.