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

What is the use case for lscm changeset extract?

I am trying to extract files to a local path from a changeset.  I'm trying this:

c:\ws1>lscm.bat changeset extract -r local -w "ws2" -d "dir" 1111 "/p1/file.bat" "dir/p1/file.bat"
	
	
	

However, I get this error:

Problem running 'changeset extract':
Could not initialize data area. Directory "C:\ws1\dir\p1\" has shared ancestor "C:\ws1" and cannot be used as a shared root.

I thought I'd used this command in past with success, but perhaps I was in a sandbox already for ws1.  For the life of me I can't figure out why you would use this command if you were already in a sandbox.  But if I try to specify a directory outside of my current sandbox, I get this:

c:\ws1>lscm.bat changeset extract -r local -w "ws2" -d "c:\temp" 1111 "/p1/file.bat" "/p1/file.bat"
Problem running 'changeset extract':
Could not initialize data area. Directory is not shared: C:\temp

What I want to do is extract files from a changeset on the server to a non-shared filepath on my local.  Is that possible?  If not, what is the purpose of lscm changeset extract?


Thanks!
Andy

Update 3/20/14 -- the initial question is answered (see below) but interestingly, it seemed like it could not locate the changeset while I was in a sandbox:
 Note:
c:\ws1>lscm -u y ls changes -r local -w "ws2" 1187
Change sets:
  (1187:_tx8hga74EeOuEP2tHKCK0A) ---@ Andrew P Jewell "<No comment>"
    Component: (1051:_St4YMairEeOuD_2tHKCK0A) "rtctool"
    Modified: 18-Mar-2014 04:55 PM
    Changes:
      --a-- (1261:_3LTtMKuNEeOBno5i1mDeiA) \build.gradle
      --a-- (1266:_3LqSgKuNEeOBno5i1mDeiA) \gradle.properties
      --a-- (1269:_TStFkKn1EeODCM_Vsp27Fw) \logging.properties
      --a-- (1262:_OSZwEK65EeOBno5i1mDeiA) \src\org\kp\build\cmdline\CliOptions.java
c:\ws1>lscm.bat changeset extract -r local -w "ws2" _tx8hga74EeOuEP2tHKCK0A "\build.gradle" "c:\temp\build.gradle"
Problem running 'changeset extract':
"\build.gradle" does not exist within the changeset.
c:\ws1>lscm.bat changeset extract -r local -w "ws2" _tx8hga74EeOuEP2tHKCK0A "build.gradle" "c:\temp\build.gradle"
Problem running 'changeset extract':
"build.gradle" does not exist within the changeset.
c:\ws1>lscm.bat changeset extract -r local -w "ws2" _tx8hga74EeOuEP2tHKCK0A "./build.gradle" "c:\temp\build.gradle"
Problem running 'changeset extract':
"./build.gradle" does not exist within the changeset.
c:\ws1>lscm.bat changeset extract -r local -w "ws2" _tx8hga74EeOuEP2tHKCK0A "/build.gradle" "c:\temp\build.gradle"
Problem running 'changeset extract':
"/build.gradle" does not exist within the changeset.
c:\ws1>lscm.bat changeset extract -r local -w "ws2" _tx8hga74EeOuEP2tHKCK0A "/rtctool/build.gradle" "c:\temp\build.gradle"
Problem running 'changeset extract':
"/rtctool/build.gradle" does not exist within the changeset.
c:\ws1>lscm.bat changeset extract -r local _tx8hga74EeOuEP2tHKCK0A "/rtctool/build.gradle" "c:\temp\build.gradle"
Problem running 'changeset extract':
"/rtctool/build.gradle" does not exist within the changeset.
c:\ws1>cd \temp
c:\temp>lscm.bat changeset extract -r local -w "ws2" _tx8hga74EeOuEP2tHKCK0A "/build.gradle" "c:\temp\build.gradle"
Successfully extracted file to "C:\temp\build.gradle".
c:\temp> 


0 votes


Accepted answer

Permanent link
The -d option is used to specify the root of the shared file system i.e if you are running the command from outside the sandbox root, it should be used.
You may try
c:\ws1>lscm.bat changeset extract -r local -w "ws2" 1111 "/p1/file.bat" "c:\temp\file.bat"

So, the file file.bat will be copied to
c:\temp\file.bat.
If the workspace "ws2" is loaded into c:\ws1 then, -d need not be used. If not, the location to
which workspace is loaded must be specified with -d option.

Andy Jewell selected this answer as the correct answer

1 vote

Comments

Thank you, Karthik!  That worked.  I found something interesting, though.  When I was in a sandbox it would not recognize the change within the changeset.  Please see the additional edit in the original question.  This this expected behavior?


c:\temp>lscm.bat changeset extract -r local -w "ws2" _tx8hga74EeOuEP2tHKCK0A "/build.gradle" "c:\temp\build.gradle"

The above command ran successfully. So,  I think the workspace is loaded in c:\temp.
So, you might try
c:\ws1>lscm.bat changeset extract -r local -w "ws2" _tx8hga74EeOuEP2tHKCK0A "\build.gradle" "c:\ws1\build.gradle" -d "c:\temp"

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
× 158

Question asked: Mar 19 '14, 7:50 p.m.

Question was seen: 5,117 times

Last updated: Mar 21 '14, 4:40 a.m.

Confirmation Cancel Confirm