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

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.

0 votes



6 answers

Permanent link
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,
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.

0 votes


Permanent link
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.

0 votes


Permanent link
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,
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.

0 votes


Permanent link
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?

0 votes


Permanent link
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.

0 votes


Permanent link
Thanks, I'll take a look on it.

0 votes

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
× 10,936

Question asked: May 19 '10, 7:57 a.m.

Question was seen: 6,236 times

Last updated: May 19 '10, 7:57 a.m.

Confirmation Cancel Confirm