It's all about the answers!

Ask a question

LSCM and extracting a file


Martin Gompertz (48611) | asked May 14 '12, 8:00 p.m.
retagged Jun 04 '12, 10:05 a.m. by Evan Hughes (2.4k1318)
Hi,

Can I use LSCM to extract a before-version of a file?

I can get a diff using this method:

lscm diff -p -w STREAMNAME -r SVR changeset CHANGESETUUID

But in order to see the "before" and "after" file I need to be able to extract the file either in its before state or its after state (and then I can use the patch to infer the other state).

Does anyone know how to do this with LSCM, please?

One answer



permanent link
Andy Jewell (24236374) | answered Mar 12 '14, 2:26 p.m.
edited Mar 12 '14, 2:29 p.m.
Checkout lscm changeset extract.  You need to have a workspace and the path to the file element that you want to extract.  E.g.:

# get your changeset alias
lscm ls changesets
# list the full paths of the files in the change you want to extract
lscm ls changes 1111
# extract them one at a time -- note: you need to provide the FULL OUTPUT path
# to include the filename.
lscm changeset extract 1111 /component/path/to/the/desire/file.txt /local/file/path.txt
Checkout the options, you can also specify which workspace to pull the files from.  I'm not sure if you can pull them directly from a stream, that would be useful but I haven't tried.

Your answer


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