Finding name of folder that was changed in a ChangeSet
I retrieved the following changeset:
Now I want to find the name of the folder that was changed. How can I do that?
{
"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
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.
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.
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.
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:
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.
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:
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.