It's all about the answers!

Ask a question

Moved/renamed file appears as 'deleted' in Pending Changes. How do I merge in my changes to the new location/name?

Craig Hibbert (307) | asked Nov 05 '15, 6:07 a.m.
The scenario
Bill and Ben are making changes to a file called foo.txt
Bill moves the file to a new location and renames it to baa.txt, using the WebStorm plugin JazzConnect-IntelliJ from CM-Logic.  Bill delivers the changes.
Ben comes to deliver his changes and finds he has a merge.
Upon accepting Bill's changes, Ben find the Pending Changes view is listing foo.txt as 'Deleted' and the only merge option is to remove the file, which would also remove his changes as a consequence.

Looking at the state of his system, Ben can now see both foo.txt, containing his changes (merge outstanding), and baa.txt (in the new location), containing Bill's changes.

Looking at the history of foo.txt, Ben can see all changesets up to the point that Bill moved it.  In the changeset where Bill moved the file and renamed it, Ben asks RTC to compare foo.txt with the previous changeset to which RTC reports "There were no changes to the selected file".

If Ben accepts the only merge option available to him the Pending Changes view, his changes will be lost.
Ben is using the Eclipse RTC plugin.

The questions
Why is the Pending changes view showing the file as 'Deleted' rather than moved?
How should Ben merge his changes into Bill's?

One answer

permanent link
Craig Hibbert (307) | answered Nov 10 '15, 3:11 a.m.
edited Nov 10 '15, 3:17 a.m.
 The answer
My colleague, Bill, moved the file using the drag and drop feature of the WebStorm IDE.  It turns out that the JazzConnect-IntelliJ plugin for WebStorm does not hook into this mechanism and, therefore, RTC ended up seeing the change as one deleted file and one added file.  There was, however, no warning that this might be that case.

Bill had noticed that there is also a move/rename menu option added by the JazzConnect-IntelliJ plugin and wondered at the time if he should have used that instead.

In parallel with posting this question on, we also raised a support ticket with CM-Logic, makers of the JazzConnect-IntelliJ plugin.  There response was:

The default Webstorm/IntelliJ move/rename function operates differently from the way RTC expects it to be done, hence us adding the move/rename option under the RTC section.
But I take your point on perhaps notifying and/or triggering the RTC operation if the plugin is enabled.
I have logged this as an RFE so our developers can take a look.
So, in short, don't use the default WebStorm behaviour, use the menu options added by JazzConnect-IntelliJ instead.

Your answer

Register or to post your answer.