如何添加 p4sql 查询作为 Perforce 自定义工具参数?

发布于 2024-07-24 08:32:45 字数 494 浏览 0 评论 0原文

我正在尝试添加 此 p4sql 查询< 作为 P4V (Windows) 中的自定义工具

-s "select * from changes where lcase(description) like '$%$D$%' and p4options='longdesc';"

/a> 通过添加 p4sql.exe 作为应用程序和参数

。 当我执行命令并输入“123”作为输入时,会返回以下错误:

p4sql error:
    Usage: p4sql -h for usage.
    Option: 12 is undefined.

我缺少什么转义机制?

I'm trying to add this p4sql query as a Custom Tool in P4V (Windows) by adding p4sql.exe as the application and

-s "select * from changes where lcase(description) like '$%$D$%' and p4options='longdesc';"

as Arguments.

When I execute the command and enter '123' as input, the following error comes back:

p4sql error:
    Usage: p4sql -h for usage.
    Option: 12 is undefined.

What escape mechanism am I missing?

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

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

发布评论

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

评论(1

孤凫 2024-07-31 08:32:45

我最近更新了问题正如我所说,P4V 中存在一个错误,并且 P4SQL 似乎也很不稳定。 如果在“$%”和“$D”之间放置空格,有时可以让它工作。 将其更改

...like '$%$D$%' and...

...like '$% $D $%' and...

:进行此更改后,它有时会起作用,但某些搜索仍然会失败,因为这些空格成为搜索字符串的一部分。 我还注意到一些搜索失败的原因我无法解释。 我去年 10 月向 Perforce 报告了这个问题,他们确认这是一个错误,但尚未修复。

您最好使用另一个问题中提到的解决方案之一。 使用 P4Win 或将更改列表转储到文件中,然后搜索该文件。

I recently updated the question you referenced and, as I stated, there is a bug in P4V, and P4SQL seems pretty flaky as well. You can get it to work some of the time if you put spaces between the "$%" and the "$D". Change this:

...like '$%$D$%' and...

to this:

...like '$% $D $%' and...

It will work some of the time after making this change, but some searches will still fail as those spaces become part of the search string. I've also noticed some searches fail for reasons I can't explain. I reported this to Perforce last October, and they confirmed it was a bug, but have yet to fix it.

You're better off using one of the solutions mentioned in the other question. Use P4Win or dump the change lists to a file and then search the file.

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