[closed] How can I extract the files from a changeset to the filesystem?
![]()
Hello,
I am working with RTC 4.0.3.
Given a changeset I would like to be able to extract the files to the filesystem. What I have tried doing from the Eclipse client is:
The first problem is that the folder structure is not maintained and secondly I can only do this one file at a time.
How can I copy all files in a changeset to the filesystem while maintaining the folder structure as well?
Thank you and best regards,
Andrew
|
The question has been closed for the following reason: "The question is answered, right answer was accepted" by spriteburn Sep 02 '14, 2:47 a.m.
Accepted answer
![]()
Andrew Trobec,
I'm not familiar with a way to do this via Eclipse (I went through a couple flows in my RTC 5.0 Eclipse client and didn't see anything related to what you are looking for.) However, you can do this via the CLI, so if you are comfortable with some scripting this can be your workflow (for some reason IBM doesn't have this CLI command advertised in the 5.x documentation, but it's still there.) 1. Script up something to run this command: http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m3/topic/com.ibm.team.scm.doc/topics/changeset_extract.html - This will extract the changeset's versionables to an output directory. 2. If you are in the Eclipse Component History, for example (Show -> History) and you want to extract a specific changeset, you can right-click the changeset and select 'Copy URL' then paste into Notepad or something, you should get something like 'https://myrtc.com/ccm/resource/itemOid/com.ibm.team.scm.ChangeSet/_zd9z0up6EeOX2fFKCpeFrQ?Workspace=_6GU9Edq5EeKrDorZ-x_CeQ' and you can grab the changeset UUID from there and feed it to the script (using the workspace UUID which is also at the end of the URL.) Obviously it would be nice to just do some mouse clicks to do this from the Eclipse GUI, but this gives you something workable you can improve upon. Andrew Trobec selected this answer as the correct answer
Comments Thank you Winston.
Do you have any experience with this command? I am trying to get it to work but I am having trouble, especially with the <path-to-item> parameter. I am trying to accomplish the task without having to create and load a workspace.
Since the repository contains a large amount of files and folders, the requirement is for a configuration manager to extract a given changeset's content without having to load an unnecessary barrage of files.
Regards,
Andrew
1
Andrew Trobec,
1
IBM has a Perl script posted that does essentially what you want and it should work for 4.0.3. Their script diffs 2 streams and then writes out the diff content to the filesystem:
Thanks again Winston, I appreciate your input. I have managed to develop a Windows batch script that uses the list changes command to write a change set to file, then after performing some batch commands to analyse and prepare the file, and recreate the directory structure, uses the changeset extract command to export the files. You are right that it's a bit slow (around 15 seconds per file), but it's better than a kick in the balls!
Does the get change command in CLI 5.0 extract all changes in one swoop?
Regards,
Andrew
Andrew Trobec,
|