Java API extending - current change set displays last change set assets
Hi,
I am experiencing the following issue using the RTC 4.0.2 Java API. First, I deliver a project (folder structures and files) to the repository with a change set comment. It displays correctly in the Repository Files view in the Jazz Admin perspective. I then move a subfolder and file within that project and deliver that update to the repository. The moved subfolder and file display correctly in the Repository Files view, but the issue is that the moved subfolder and file also display in their original location, as if I did a copy and not a move. And if I delete a previously delivered file and update the project using the API the file still appears in the current change set.
If I repeat the same actions and perform the deliver using the RTC client then the dir/file moves and deletions display correctly.
My API code merely discovers the repoPath of each dir and file under the project parent dir and passes it to iconfig.resolvePath to discover if it exists or not in the component, then does creation or update based on the state of filePathHandle.
IVersionableHandle filePathHandle = iconfig.resolvePath(cmpntroot, repoPath, monitor);
Do I also need to discover what exists on the component side and delete on the component side if it does not exist in the current package I am delivering? Or is there some property I can set which specifies to not include earlier change set revisions in the latest change set I am delivering? Thanks in advance!
Peter
Comments
Remy Suen
Oct 29 '13, 10:55 a.m.I think it would be better if you provided more of your code. It's not clear how you're moving the files and folders at the moment.
Peter Moraza
Oct 29 '13, 5:08 p.m.Hi Remy, I will copy the relevant code here, but first want to more graphically illustrate the issue.
Peter Moraza
Nov 04 '13, 8:42 p.m.Hi Remy,
Peter Moraza
Nov 04 '13, 9:07 p.m.Here is the code delivering the change sets to RTC.
Peter Moraza
Nov 04 '13, 9:20 p.m.Hi,
Remy Suen
Nov 05 '13, 8:35 a.m.When change sets build on top of each other, you cannot just randomly deliver a subset of them as it creates a gap. If you say the changes look fine on disk then it seems like the way you are creating the change sets to move your files and folders is incorrect.
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 05 '13, 9:42 a.m.I haven't found how to move files, but as described here: https://rsjazz.wordpress.com/2013/09/30/delivering-change-sets-and-baselines-to-a-stream-using-the-plain-java-client-libraries/ you have to be careful what you do with the API. You can easily use the API and upload the same content again. If you move files, I assume there is some kind of rename capability. If you just upload the files at a different place, you just create a new copy. At least you would have to delete the old file, to avoid duplicates. However, to preserve the history, I would assume there is something like a move or rename capability in the API.
Peter Moraza
Nov 06 '13, 9:51 p.m.I was testing delivering Eclipse sandbox (on local machine) moves and deletions when I encountered this behavior. I am not trying to move or delete files in the repo workspace and not make those changes locally. I just want to deliver everything in my Eclipse sandbox (on local machine) to the stream and have my Eclipse sandbox (on local machine) accurately depicted there. Sorry I cannot paste .jpg images, but I lack the reputation points to do so. I'll read the rsjazz link and comment further later. Thanks for all your input so far!