It's all about the answers!

Ask a question

Finding name of folder that was changed in a ChangeSet


S M (8621923) | asked Dec 19 '11, 8:14 a.m.
I retrieved the following changeset:

{

"changes": [
{
"kind": 10,
"item": {
"uri": "itemOid\/com.ibm.team.filesystem.FileItem\/_2ItWACJKEeGAaaEbbqTtgw",
"itemId": "_2ItWACJKEeGAaaEbbqTtgw",
"com.ibm.team.repository.typeName": "com.ibm.team.filesystem.FileItem"
},
"before": "_Ngn9BCJeEeG25dOp_iUerQ",
"after": "_WLdK4iJ5EeG63tfBsj11_Q",
"internalId": "_WL7E8CJ5EeG63tfBsj11_Q"
},
{
"kind": 1,
"item": {
"uri": "itemOid\/com.ibm.team.scm.Folder\/_Uy41cCJ5EeGmx9rBZ7tE2Q",
"itemId": "_Uy41cCJ5EeGmx9rBZ7tE2Q",
"com.ibm.team.repository.typeName": "com.ibm.team.scm.Folder"
},
"before": null,
"after": "_WLdK5SJ5EeG63tfBsj11_Q",
"internalId": "_WL7E8SJ5EeG63tfBsj11_Q"
}
],
"comment": "",
"lastUpdatedDate": "2011-12-09T15:21:04.795Z",
"active": false,
"owner": {
"uri": "itemOid\/com.ibm.team.repository.Contributor\/_hhbosPC1EeCsJbI2ZgPDog",
"itemId": "_hhbosPC1EeCsJbI2ZgPDog",
"com.ibm.team.repository.typeName": "com.ibm.team.repository.Contributor"
},
"com.ibm.team.repository.typeName": "com.ibm.team.scm.ChangeSet",
"stateId": "_aSiVASJ5EeG63tfBsj11_Q",
"component": {
"uri": "itemOid\/com.ibm.team.scm.Component\/_auolkPC9EeCek69P-ztT9w",
"itemId": "_auolkPC9EeCek69P-ztT9w",
"com.ibm.team.repository.typeName": "com.ibm.team.scm.Component"
},
"contextId": "_Dp6kMdwTEd2jUupDpQV1Rw",
"predecessor": "_WL7sACJ5EeG63tfBsj11_Q",
"modified": "2011-12-09T15:21:04.852Z",
"mergePredecessor": null,
"uri": "itemOid\/com.ibm.team.scm.ChangeSet\/_WKycgSJ5EeG63tfBsj11_Q",
"itemId": "_WKycgSJ5EeG63tfBsj11_Q",
"properties": [

],
"modifiedBy": {
"uri": "itemOid\/com.ibm.team.repository.Contributor\/_hhbosPC1EeCsJbI2ZgPDog",
"itemId": "_hhbosPC1EeCsJbI2ZgPDog",
"com.ibm.team.repository.typeName": "com.ibm.team.repository.Contributor"
},
"xComponentLink": null,
"etag": "_aSiVASJ5EeG63tfBsj11_Q"
}


Now I want to find the name of the folder that was changed. How can I do that?

7 answers



permanent link
Michael Valenta (3.7k3) | answered Dec 19 '11, 8:47 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
There are a couple of ways:

1) The first is to use the itemid and stateId to fetch the state using the IVersionableManager.

2) The second is to use the IFilesystemService#interpretChanges to get a more detailed change set that includes paths.

Comments
praveen patidar commented Nov 08 '12, 6:47 p.m.

Can you Explain me the scenario in terms of change set.
Lets say I have got the change set object , How I proceed further to get the name of files that has been changed?
 


permanent link
S M (8621923) | answered Dec 19 '11, 8:48 a.m.
Thanks a lot for the hints, can you provide an example how to build one of these two query URIs?

There are a couple of ways:

1) The first is to use the itemid and stateId to fetch the state using the IVersionableManager.

2) The second is to use the IFilesystemService#interpretChanges to get a more detailed change set that includes paths.

permanent link
Geoffrey Clemm (30.1k33035) | answered Dec 19 '11, 11:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
And a reminder to folks familiar with the ClearCase directory versioning
model: in RTC, a file/directory version records the name it has in its
parent directory (unlike the ClearCase model, which follows the Unix
model, where a directory records the name of each of the file/directory
members of that directory).

Cheers,
Geoff

On 12/19/2011 8:53 AM, mvalenta wrote:
There are a couple of ways:

1) The first is to use the itemid and stateId to fetch the state using
the IVersionableManager.

2) The second is to use the IFilesystemService#interpretChanges to get
a more detailed change set that includes paths.

permanent link
S M (8621923) | answered Dec 19 '11, 4:41 p.m.
Hi Goeff

I don't really understand your post. How does this relate to my problem. Sorry, I'm not very experienced.

permanent link
Geoffrey Clemm (30.1k33035) | answered Dec 19 '11, 8:53 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
First, you'll want to ignore my previous post unless you are a ClearCase
user who understands the ClearCase directory versioning model.

If you are such a ClearCase user, then Michael's hint might be
confusing, because you'd expect to look for the changed name of a folder
in the selected version of the parent folder of that folder ... which is
not where you look for it in RTC (in RTC, you look for the changed name
of a folder in the selected version of that folder.

Cheers,
Geoff



On 12/19/2011 4:53 PM, mueller wrote:
Hi Goeff

I don't really understand your post. How does this relate to my
problem. Sorry, I'm not very experienced.

permanent link
S M (8621923) | answered Dec 20 '11, 10:47 a.m.
THanks GoeffI

I'm a RTC user, and I'm using the REST API.

permanent link
S M (8621923) | answered Jan 16 '12, 7:57 a.m.
Any new hints on that problem? I still couldn't solve this issue :(

Cheers
mueller

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.