如何在 diff 查看器仍然打开的情况下让cleartool diff 返回命令行?

发布于 2024-08-15 22:13:50 字数 433 浏览 4 评论 0原文

如SO问题“

cleartool diff -g filename filename@@clearcase-virtual- 形式的命令,单个 diff 在 WinMerge 中可以正常打开path-to-version-I-want-to_compare-to

但是当我在 cygwin 中运行该命令时,它不会返回到命令提示符,直到我退出 WinMerge。

我想从 .bat 文件或 shell 脚本(一个给定 ClearCase 活动的更改集中的每个文件)执行一些这样的命令,并让它打开多个 WinMerge 实例,或在单个 WinMerge 实例中打开多个窗口。

我曾经能够做到这一点,但我忘记了如何做到。有人可以提醒我吗?

我感觉这并不是一个真正的 ClearCase 问题,而可能是一个关于从 cygwin 命令行生成进程的 DOS 或 shell 问题...

As described in one of the answers to SO question "Any way to use a custom diff tool with cleartool/clearcase?" I have installed WinMerge and a single diff opens fine in WinMerge based on a command of the form

cleartool diff -g filename filename@@clearcase-virtual-path-to-version-I-want-to_compare-to

But when I run that command in cygwin, it does not return to the command prompt until I exit WinMerge.

I want to execute a few such commands from a .bat file or shell script (one for each file in the change set of a given ClearCase activity) and have it either open multiple WinMerge instances, or multiple windows in a single WinMerge instance.

I was able to do that once but I've forgotten how. Can someone remind me?

I sense that this is not really a ClearCase question, but perhaps a DOS or shell question about spawning processes from the cygwin command line ...

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

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

发布评论

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

评论(2

胡大本事 2024-08-22 22:13:50

在行尾放置一个 & 符号以在后台运行它:

cleartool diff -g filename filename@@clearcase-virtual-path-to-version-I-want-to_compare-to &

Put an ampersand at the end of the line to run it in the background:

cleartool diff -g filename filename@@clearcase-virtual-path-to-version-I-want-to_compare-to &
傲影 2024-08-22 22:13:50

正如 Winmerge 命令行手册页中所述

/s 将 WinMerge 窗口限制为单个实例。例如,如果 WinMerge 已在运行,则会在同一实例中打开一个新的比较。如果没有此参数,则允许使用多个窗口:根据其他设置,可能会在现有窗口或新窗口中打开新的比较。

因此,您可以多次调用 WinMerge:

  • 通过后台进程(例如 troelskn 建议
  • 或通过 DOS 调用

    call "c:\Program Files (x86)\WinMerge\WinMergeU.exe" /s ...

应该只能启动一个 WinMerge 实例并继续执行 DOS 脚本。


注意:这不适用于 map 文件我在另一个 SO 答案中提到,因为 map 文件需要:

  • 一个可执行文件(.bat 或 < code>.cmd 不起作用)
  • 没有选项(WinMergeU.exe 起作用,WinMergeU.exe /s 不起作用)

As mentioned in the Winmerge Command Line man page

/s limits WinMerge windows to a single instance. For example, if WinMerge is already running, a new compare opens in the same instance. Without this parameter, multiple windows are allowed: depending on other settings, a new compare might open in the existing window or in a new window.

So you could call WinMerge multiple time:

  • either through a background process (like troelskn suggests)
  • or through a DOS call

    call "c:\Program Files (x86)\WinMerge\WinMergeU.exe" /s ...

should be able to launch only one WinMerge instance and continue the DOS script.


Note: this does not work with the map file I mention in this other SO answer, since a map file needs:

  • an executable (.bat or .cmd will not work)
  • no options (WinMergeU.exe works, WinMergeU.exe /s will not)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文