Programmatically patch creation
Hi,
I'd like to know if is there a way to create a patch programmatically from a change-set using client side java plain API. Is there someone that have already done this kind of activity? Which class and method could I use? Thanks, Michele. |
6 answers
Michele,
Unfortunately, there is no API for doing this. You may be able to do it using the command line client using the "scm diff" command. Michael mikyjpeg wrote: Hi, |
Michael,
thank you for the answer. I'm not really used with this command but I'm making some test. I'm not shure about how to correctly use it for my use-case. What I'm trying to develop is the following scenario: I have a repository workspace on which I've create a change-set. Then I have deliver my change-set to my target stream. What I'd like to do is develop something that -create a new temporary repository workspace from stream -create a patch using the latest change-set -apply the patch to my rep.ws -check-in and delivery the new created change-set -remove the temporary rep.ws From diff's command reference it seems that it could be used on single file, not with an entire change-set. Is it true? And if this is not true, I've not understand yet which parameter I've to use as target and previous version in order to create the correct patch. Any idea would be really appreciate. Thanks, Michele. |
Michele,
I'm not that familiar with the CLI so I don't have much advice to offer there. However, I think the command for getting a patch from a chaneg set is 'scm diff changeset <uuid>' where you get the UUID or alias using one of the CLI status commands. Michael mikyjpeg wrote: Michael, |
Hi, I'm wondering if there are still no API to do this.
I have find this class on sdk: com.ibm.team.filesystem.common.internal.patch.CreatePatchUtil with a createPatch method. But I can't find any classes (either in test jars) where this command is used. Does anyone have some idea about this? |
There's still no API. The class you found is involved in patch creation but it is called from one of our UI plug-ins so you would need to get the full RTC Eclipse client to see examples of it's use.
|
Thanks, I'll take a look on it.
|
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.