简体   繁体   English

重命名Java文件,但保留历史记录在IBM Rational Synergy 7.1中

[英]Rename Java file but keep history in IBM Rational Synergy 7.1

In the very big Java project I'm currently participating in, we use IBM Rational Synergy 7.1 as SCM. 在我目前参与的一个非常大的Java项目中,我们使用IBM Rational Synergy 7.1作为SCM。 Now, a huge amount of rename and move refactorings are coming up due to changes in the architecture. 现在,由于体系结构的变化,出现了大量的重命名和移动重构。

We would prefer to have Eclipse as the leading side in the refactoring, with (roughly) the following workflow: 我们希望将Eclipse作为重构的领导者,并使用(大致)以下工作流程:

  1. Apply the refactoring using the JDT tools 使用JDT工具应用重构
  2. Move the files in Synergy in order to keep the history of the file (if possible automated with Synergy CLI) 在Synergy中移动文件以保留文件的历史记录(如果可能,可通过Synergy CLI自动执行)

If we just do the refactoring and sync, the old file will be marked as deleted and the new file will have version 1. This is obviously not desired. 如果我们只是进行重构和同步,则旧文件将被标记为已删除,而新文件将具有版本1。这显然是不希望的。

Is there a way to achieve step 2 with the Synergy CLI considering the old version with the old name is the one that is currently on the server while the new version only exists in the work area for the time being? 考虑到具有旧名称的旧版本是服务器上当前存在的旧版本,而新版本暂时仅存在于工作区中,是否可以通过Synergy CLI实现步骤2? You may assume that I have all the necessary information about the old file in the database (instance, name, version etc) available, I reckon I have to gather that beforehand. 您可能会假设我拥有有关数据库中旧文件的所有必要信息(实例,名称,版本等),我认为我必须事先收集这些信息。

Thanks :) 谢谢 :)

We are going to use the Synergy CLI for this and have roughly this workflow: 我们将为此使用Synergy CLI并大致拥有以下工作流程:

  1. Do Refactoring in Eclipse 在Eclipse中进行重构
  2. Rename the target file of the refactoring (adding a suffix) 重命名重构的目标文件(添加后缀)
  3. Use the CLI command ccm move to move the files in synergy 使用CLI命令ccm move协同移动文件
  4. Delete the file that was created in the workarea and remove the suffix from the file in step 2 删除在工作区中创建的文件,并在步骤2中从文件中删除后缀
  5. sync the project 同步项目

I ommited things like setting a task, those have to be done. 我忽略了诸如设置任务之类的事情,这些事情必须要做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM