Is it possible to deliver a single file using scm tools?
Hello,
I want to deliver a single file into a stream using SCM Tools. I've read this article:
http://www-01.ibm.com/support/knowledgecenter/SSCP65_2.0.0.2/com.ibm.team.scm.doc/topics/r_scm_cli_deliver.html
but it seems that it is only possible to deliver a bunch of files.
Do you have any suggestion?
Regards,
Francisco R.
Accepted answer
Hi Francisco,
As mentioned earlier, the way that you flow file changes around in SCM is using change sets. A change set can have zero or more file changes in it. In your case, it sounds like you want to deliver a change set to the stream with only a single file change in it.
In order to do this with scmtools (or CLI) you will first need to find/create a repository workspace from the stream so that you can load it to a folder on your local disk.
# create a repository workspace using the CLI (if you don't already have one)
lscm create workspace -r <serverUri> -s <yourStreamName> <repositoryWorkspaceName>
# load repository workspace (in an empty directory)
lscm load -r <serverUri> <repositoryWorkspaceName>
Once the repository workspace is loaded onto your local disk you can make a change to the file and then checkin the changes into a new change set.
# make changes to file foo.txt
lscm checkin src/foo.txt
Finally, you can deliver the change set with the one file change in it to the stream. Note that this command will deliver all change sets. In this case there should only be one created above.
lscm deliver
It is possible that the deliver will fail due to a missing comment on the change set. You can either configure your project area permissions to allow change sets with empty comments or you can use the CLI to set the changeset comment. Check out "lscm help set changeset" for more information.
I hope that this helps,
Chris
As mentioned earlier, the way that you flow file changes around in SCM is using change sets. A change set can have zero or more file changes in it. In your case, it sounds like you want to deliver a change set to the stream with only a single file change in it.
In order to do this with scmtools (or CLI) you will first need to find/create a repository workspace from the stream so that you can load it to a folder on your local disk.
# create a repository workspace using the CLI (if you don't already have one)
lscm create workspace -r <serverUri> -s <yourStreamName> <repositoryWorkspaceName>
# load repository workspace (in an empty directory)
lscm load -r <serverUri> <repositoryWorkspaceName>
Once the repository workspace is loaded onto your local disk you can make a change to the file and then checkin the changes into a new change set.
# make changes to file foo.txt
lscm checkin src/foo.txt
Finally, you can deliver the change set with the one file change in it to the stream. Note that this command will deliver all change sets. In this case there should only be one created above.
lscm deliver
It is possible that the deliver will fail due to a missing comment on the change set. You can either configure your project area permissions to allow change sets with empty comments or you can use the CLI to set the changeset comment. Check out "lscm help set changeset" for more information.
I hope that this helps,
Chris
2 other answers
You can only ever ever deliver change sets to a component in a stream. You would have to create a new change set and check the file into that. To be able to do that you would have to complete all other open change sets if you had previously checked in the same file into any of those.