在 TortoiseHg 中使用 Beyond Compare 进行视觉差异

发布于 2024-09-01 19:18:38 字数 602 浏览 5 评论 0原文

我正在尝试在 TortoiseHg 中使用 Beyond Compare 进行视觉差异。例如,右键单击资源管理器中的修改文件,然后从 TortoiseHg 上下文菜单中选择 Visual Diff...

BeyondCompare 打开,但仅显示“欢迎”屏幕,而不显示我想要比较的文件。我错过了什么吗?

我已按如下方式设置 Mercurial.ini 文件:

  [extensions]
  extdiff =

  [extdiff]
  cmd.bcomp = C:\Program Files (x86)\Beyond Compare 3\BCompare.exe
  opts.bcomp = /ro

  [tortoisehg]
  vdiff = bcomp

  [merge-tools]
  bcomp.executable = C:\Program Files (x86)\Beyond Compare 3\BComp
  bcomp.args = $local $other $base $output
  bcomp.priority = 1
  bcomp.premerge = True
  bcomp.gui = True

  [ui]
  merge = bcomp

I am trying to use Beyond Compare for Visual Diff in TortoiseHg. eg Right click on a modified file in explorer and select Visual Diff from TortoiseHg context menu...

BeyondCompare opens but only shows the 'welcome' screen and not the file I want to diff. Am I missing something?

I have setup the mercurial.ini file as follows:

  [extensions]
  extdiff =

  [extdiff]
  cmd.bcomp = C:\Program Files (x86)\Beyond Compare 3\BCompare.exe
  opts.bcomp = /ro

  [tortoisehg]
  vdiff = bcomp

  [merge-tools]
  bcomp.executable = C:\Program Files (x86)\Beyond Compare 3\BComp
  bcomp.args = $local $other $base $output
  bcomp.priority = 1
  bcomp.premerge = True
  bcomp.gui = True

  [ui]
  merge = bcomp

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

倾其所爱 2024-09-08 19:18:38

找到了答案。

TortoiseHg 全局设置中的视觉差异工具必须设置为“beyondcompare3”而不是“bcomp” '。

TortoiseHg 与 Beyond Compare

Found the answer.

Visual Diff Tool in TortoiseHg Global Settings had to be set to 'beyondcompare3' instead of 'bcomp'.

TortoiseHg and Beyond Compare

一城柳絮吹成雪 2024-09-08 19:18:38

在我们的例子中,当我们将 mercurial.ini 添加到 TortoiseHG 时,也发生了同样的问题。看起来默认配置来自 TortoiseHG\hgrc.d 文件夹。具体的 diff 和 merge 工具配置可以在 MergeTools.rc 中找到。

仅供参考,以下是如何在 mercurial.ini 中手动配置 Beyond Compare 3

[merge-tools]
bcomp.executable = C:\Program Files (x86)\Beyond Compare 3\BComp.exe
bcomp.priority = 1
bcomp.premerge = True
bcomp.gui = True

bcomp.args=$local $other $base /mergeoutput=$output /ro /lefttitle=parent1 /centertitle=base /righttitle=parent2 /outputtitle=merged /automerge /reviewconflicts /solo
bcomp.diffargs=/lro /lefttitle='$plabel1' /righttitle='$clabel' /solo /expandall $parent $child
bcomp.diff3args=$parent1 $parent2 $child /lefttitle='$plabel1' /centertitle='$clabel' /righttitle='$plabel2' /solo /ro
bcomp.dirdiff=True

请注意,无需启用 extdiff 扩展。此外,还应重新启动 TortoiseHG 才能应用此设置。

In our case the same problem happened when we added mercurial.ini to TortoiseHG. It looks like by default configuration comes from TortoiseHG\hgrc.d folder. Specifically diff and merge tools configuration can be found in MergeTools.rc.

Just for the reference, here is how Beyond Compare 3 can be configured manually in mercurial.ini:

[merge-tools]
bcomp.executable = C:\Program Files (x86)\Beyond Compare 3\BComp.exe
bcomp.priority = 1
bcomp.premerge = True
bcomp.gui = True

bcomp.args=$local $other $base /mergeoutput=$output /ro /lefttitle=parent1 /centertitle=base /righttitle=parent2 /outputtitle=merged /automerge /reviewconflicts /solo
bcomp.diffargs=/lro /lefttitle='$plabel1' /righttitle='$clabel' /solo /expandall $parent $child
bcomp.diff3args=$parent1 $parent2 $child /lefttitle='$plabel1' /centertitle='$clabel' /righttitle='$plabel2' /solo /ro
bcomp.dirdiff=True

Notice that there's no need in enabling extdiff extension. Also TortoiseHG should be restarted to apply this setting.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文