如何通过超链接打开p4文件

发布于 2024-12-12 02:51:19 字数 237 浏览 0 评论 0 原文

例如,我写了一个文档,提交给p4,然后我想在公司内网上分享或者通过电子邮件通知其他人。

我创建了一个帖子,并在帖子中将 p4 文档作为超链接引用。 当用户点击它时,他的本地P4将根据他的p4配置启动同步文档(如果不允许他访问相关存储库,则会失败),然后该文档将在他的PC上打开。

通过想象这个功能,我只是想找到一个轻松共享 p4 文档的解决方案。 由于我不想将文档上传到内网,然后手动在 p4 之间同步。 欢迎任何建议。 谢谢。

For example, I have written a document and submited to p4.Then I would like to share it on the company intranet or notify the others by email.

I create a post and refer to the p4 document as a hyperlink in the post.
When the user click on it, his local P4 will be launched to sync the document according to his p4 config(would be failed if he is not allow to access the relevant repo), then the document will be opend on his PC.

By imaging this feature, I am just trying to find a solution to share p4 document easily.
Since I dont want to upload the documents to the intranet then sync it between p4 manually.
Any suggestion is welcome.
thanks.

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

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

发布评论

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

评论(3

诠释孤独 2024-12-19 02:51:19

您可以尝试使用自定义 url 协议和处理程序。这将允许您编写类似 p4v://Some/place/some/where/ 的 url。设置将取决于您的平台。

然后,您可以使用 -s 选项将处理程序设置为 p4v 可执行文件。这将打开一个位置,但不会提供任何类型的同步。

p4v -s "//Some/place/some/where/"

您可能还需要将 url 强制转换为有效的 perforce 路径。例如,Windows url 将在冒号之前包含文本,从而导致问题。

p4v -s "p4v://Some/place/some/where/"

因此,您可能需要围绕 p4v 的执行编写一个包装脚本来进行一些文本过滤。这有点痛苦,这就是为什么我自己没有这样做。

You can try using a custom url protocol and handler. This would allow you to write urls like p4v://Some/place/some/where/. The setup will depend on your platform.

You could then set the handler to the p4v executable with the -s option. This will open a location, but it won't provide any kind of syncing.

p4v -s "//Some/place/some/where/"

You may also need to coerce the url into a valid perforce path. For example, windows urls will include the text before the colon, causing problems.

p4v -s "p4v://Some/place/some/where/"

So you will probably have to write a wrapper script around the execution of p4v to do some text filtering. This is all kind of a pain, which is why I haven't done it myself.

晨光如昨 2024-12-19 02:51:19

另一种简单的技术是设置您的 Intranet Web 服务器以从频繁同步的工作区提供文档,如下所述: http://www.perforce.com/customers/white_papers/web_content_management_perforce

我已经使用这种机制,使用 Apache Web 服务器和 Perforce 客户端工作区,并使用每 10 秒同步一次工作区的 cron 脚本,在开发环境中通过 URL 与数十名活跃的开发人员共享文档,非常成功。

Another simple technique is to set up your intranet web server to serve documents from a frequently-sync'd workspace, as described here: http://www.perforce.com/customers/white_papers/web_content_management_perforce in the section "2. A Simple WCM Approach".

I have used this mechanism, with an Apache web server, and a Perforce client workspace with a cron script sync'ing the workspace every 10 seconds, to share documents via URL in a development environment with dozens of active developers, quite successfully.

2024-12-19 02:51:19

唯一想到的是 P4Web ,它通过 HTTP 为 Perforce 仓库提供服务。它仍然无法解决“根据他的 p4 配置自动同步”的问题,但至少您可以发送指向文档的链接。

The only thing that comes to mind is P4Web, which serves Perforce depot via HTTP. It still wouldn't solve the "sync automatically according to his p4 config", but at least you could send links to your document.

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