如何让 TortoiseHG 执行预差异操作

发布于 2024-12-10 22:22:05 字数 154 浏览 4 评论 0原文

我的 hg 设置中有一个 pre-diff 挂钩,但当我尝试提交更改时它没有被执行。

我想做的是在提交之前生成数据库架构文件,以便它将出现在更改列表中。

我还有一个运行良好的更新挂钩。 TortoiseHG 是否未执行 hg diff 命令?我可以改用哪个钩子?

I have a pre-diff hook in my hg setup but it is not being executed when I try to commit my changes.

What I'm trying to do is generate the database schema file before commit so that it will appear in the list of changes.

I also have an update hook which works fine. Is TortoiseHG not performing an hg diff command? Which hook could I use instead?

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

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

发布评论

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

评论(1

月亮是我掰弯的 2024-12-17 22:22:05

TortoiseHg(从 v2.1.4 开始)至少以 3 种方式执行差异,其中没有一种使用原始 hg diff 命令:

  1. 在工作台的“修订详细信息”窗口中,有一个文件级显示统一差异。此差异是通过 mdiff.unidiff 获得的mdiff.py 中的 方法。该方法绕过了钩子机制。
  2. 如果在修订图中选择了变更集(或变更集范围),则用户可以请求“视觉差异”。此方法将文件从选定的修订版本复制到临时目录,然后将它们与外部视觉差异工具进行比较。该方法也绕过了钩子机制。
  3. 在“清单”视图中,您可以选择一个文件,右键单击并“比较文件修订版本”。这使用了自定义的视觉差异实用程序,它也绕过了钩子机制。

据我所知,TortoiseHg 没有为其 diff 机制公开任何钩子。

TortoiseHg (as of v2.1.4) performs diffs in at least 3 ways, none of which use a raw hg diff command:

  1. In the "Revision Details" window of the Workbench, there is a file-level unified diff shown. This diff is obtained through mdiff.unidiff method in mdiff.py. This method bypasses the hook mechanism.
  2. If a changeset (or range of changesets) is selected in the revision graph, the user can ask for a "Visual Diff". This method copies the files from the selected revisions to a temporary directory and then compares them with an external visual diff tool. This method also bypasses the hook mechanism.
  3. In the "Manifest" view, you can select a file, right-click and "Compare file revisions". This uses a custom visual diff utility which also bypasses the hook mechanism.

As far as I know, TortoiseHg does not expose any hooks for its diff mechanism.

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