LSCM and extracting a file
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?
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
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.