例如,我写了一个文档,提交给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.
发布评论
评论(3)
您可以尝试使用自定义 url 协议和处理程序。这将允许您编写类似
p4v://Some/place/some/where/
的 url。设置将取决于您的平台。然后,您可以使用 -s 选项将处理程序设置为 p4v 可执行文件。这将打开一个位置,但不会提供任何类型的同步。
您可能还需要将 url 强制转换为有效的 perforce 路径。例如,Windows url 将在冒号之前包含文本,从而导致问题。
因此,您可能需要围绕 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.
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.
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.
另一种简单的技术是设置您的 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.
唯一想到的是 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.