简体   繁体   English

如何将Beyond Compare与ClearCase集成?

[英]How do I integrate Beyond Compare with ClearCase?

I would like to integrate Beyond Compare with ClearCase so that I can use it for diffing and merging files, instead of the awful tools provided by ClearCase. 我想将Beyond Compare与ClearCase集成,以便我可以使用它来进行差异和合并文件,而不是使用ClearCase提供的糟糕工具。

Does anyone have instructions for performing this integration? 有没有人有执行此集成的说明?

As mentioned in my previous answer , just modify the map file located in: 正如我之前的回答中所提到的,只需修改位于以下位置的地图文件

# up to ClearCase 7.0
c:\program files\rational\ClearCase\lib\mgrs

or 要么

# ClearCase 7.1 and more
c:\program files\IBM\RationalSDLC\ClearCase\lib\mgrs

Each map line has 3 parts: the CC filetype, the CC action, and the application. 每个地图行有3个部分:CC文件类型,CC操作和应用程序。

In your case, find the section in the map file for text_file_delta file types. 在您的情况下,在map文件中找到text_file_delta文件类型的部分。
There you will find lines for CC actions compare , xcompare , merge , and xmerge . 在那里你会找到CC动作comparexcomparemergexmerge

Use BeyondCompare : 使用BeyondCompare

text_file_delta xcompare C:\Progra~1\Beyond~1\bc2.exe  

Beyond Compare 3 support all CC actions: 超越比较3支持所有CC操作:

text_file_delta compare C:\Program Files\Beyond Compare 3\BComp.exe
text_file_delta xcompare C:\Program Files\Beyond Compare 3\BComp.exe
text_file_delta merge C:\Program Files\Beyond Compare 3\BComp.exe
text_file_delta xmerge C:\Program Files\Beyond Compare 3\BComp.exe 

Note: For Beyond Compare 2, this page clearly mentions 注意:对于Beyond Compare 2, 此页面明确提到

To use Beyond Compare 2, only change the xcompare line of the map file. 要使用Beyond Compare 2,只需更改地图文件的xcompare行。
Overriding compare , merge , and xmerge is not supported. 不支持覆盖comparemergexmerge
A helper that improves BC2's support is available here . 这里提供了一个帮助改善BC2支持的帮手。


Note that what precedes is for ClearCase only, not CCRC (ClearCase Remote Client) 请注意,前面的内容仅适用于ClearCase,而不适用于CCRC(ClearCase Remote Client)

This technote illustrates how to change the XML diff/Merge tool for CCRC ( KDiff3 but you can adapt it to BeyondCompare ): 此技术说明如何更改CCRC的XML diff / Merge工具( KDiff3,但您可以将其调整为BeyondCompare ):

Change directories to the CCRC installation location > plugins > com.ibm.rational.clearcase.compare_merge.<os>_<ccrc ver> , 将目录更改为CCRC installation location > plugins > com.ibm.rational.clearcase.compare_merge.<os>_<ccrc ver>
Where <os> is the name of the operating system bits used and <ccrc ver> is the latest version of the CCRC update applied on the client. 其中<os>是使用的操作系统位的名称, <ccrc ver>是客户端上应用的CCRC更新的最新版本。

On Windows 在Windows上

  • CCRC 7.1 Default: C:\\Program Files\\IBM\\IMShared\\plugins CCRC 7.1默认值: C:\\Program Files\\IBM\\IMShared\\plugins
  • CCRC 7.0 Default: C:\\Program Files\\IBM\\Rational\\ClearCase\\CCRC\\plugins\\ CCRC 7.0默认值: C:\\Program Files\\IBM\\Rational\\ClearCase\\CCRC\\plugins\\

Example: 例:

com.ibm.rational.clearcase.compare_merge.win32x86_7.0.1.CU02
  • Copy the KDiff3 executable from its installation path to the com.ibm.rational.clearcase.compare_merge.<os>_<ccrc ver> directory 将KDiff3可执行文件从其安装路径复制到com.ibm.rational.clearcase.compare_merge.<os>_<ccrc ver>目录
  • Rename the ccrc_xmldiffmrg.exe to ccrc_xmldiffmrg_orig.exe ccrc_xmldiffmrg.exe重命名为ccrc_xmldiffmrg_orig.exe
  • Rename KDiff3.exe to ccrc_xmldiffmrg.exe KDiff3.exe重命名为ccrc_xmldiffmrg.exe
  • Close and reopen CCRC 关闭并重新开启CCRC

CCRC Issue: CCRC问题:

When updating CCRC, the plug-in directory com.ibm.rational.clearcase.compare_merge.<os>_<ccrc ver> will change . 更新CCRC时,插件目录com.ibm.rational.clearcase.compare_merge.<os>_<ccrc ver> 将更改
The steps above will need to be run again in the new plug-in directory . 需要在新的插件目录中再次运行上述步骤

Note: You can control when the updates occur by preventing CCRC from looking for updates automatically. 注意:您可以通过阻止CCRC自动查找更新来控制更新的发生时间。
Click Window > Preferences > Install/Update > Automatic Updates and disable automatic updates. 单击Window > Preferences > Install/Update > Automatic Updates并禁用自动更新。

禁用CCRC上的自动更新

An alternative to Beyond Compare is KDiff3 , which integrates very nicely with clearcase. Beyond Compare的另一种选择是KDiff3 ,它与clearcase完美结合。 Just tick off for clearcase integration when installing, and you're done. 只需在安装时勾选clearcase集成,即可完成。

在此输入图像描述

Just to piggy back on Von's answer if you're lazy like me. 如果你像我一样懒,那就回到Von的回答。

if you can search and replace with regex (like notepad++) 如果你可以搜索和替换正则表达式(如记事本++)

Find What:((text_file_delta|_html|_xml|html2|xml2)[ \t]+(compare|xcompare|merge|xmerge)[ \t]+).* 

Replace with: \1C:\\Program Files\\Beyond Compare 3\\BCompare.exe 

does all of the lines VonC mentioned for regular clearcase. VonC提到的所有行都是常规清晰的。

(assuming you have beyond compare installed at the above location, otherwise point to your path). (假设您在上述位置安装了超出比较,否则指向您的路径)。

I also found it interesting, I put "'s around the path (due to the spaces) and it didn't work, removing them solved that problem. 我也发现它很有趣,我把它放在路径周围(由于空间)并且它不起作用,移除它们解决了这个问题。

There's also the 'official' way on the BC support page: BC支持页面上还有“官方”方式:

Ofiicial Tip by Scooter 滑板车的官方提示

 1. Locate the plugins folder, which will contain a specific version named subfolder. Examples: C:\\Program Files\\IBM\\Rational\\ClearCase701\\CCRC\\plugins\\com.ibm.rational.clearcase.compare_merge.win32.x86_7.0.1.D061004 C:\\Program Files\\IBM\\IMShared\\plugins\\com.ibm.rational.clearcase.compare_merge.win32.x86_7.1.1.v201007070751 Note that the version number in path is subject to change. 2. Copy "C:\\Program Files\\Beyond Compare 3\\bcomp.exe" into the folder. 3. Move ccrc_cleardiff.exe, ccrc_cleardiffmrg.exe, ccrc_worddiffmrg.exe and ccrc_xmldiffmrg.exe to a backup folder. 4. Make 4 copies of bcomp.exe and rename them to ccrc_cleardiff.exe, ccrc_cleardiffmrg.exe, ccrc_worddiffmrg.exe and ccrc_xmldiffmrg.exe. 5. Change "CCRC Integrated (UTF-8)" to "ClearCase External" under Preferences | CCRC | Integration | Compare_Merge. 

BUT there's something else you should do. 但是你还应该做些什么。 When setting the merge tool, you should override the comparison to the original 'CCRC Integrated', like so: 设置合并工具时,您应该覆盖与原始“CCRC Integrated”的比较,如下所示:

覆盖目录比较

BC does not yet handle Clear Case Directory Comparison. BC尚未处理明确案例目录比较。

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

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