How to open p4 file with a hyperlink

For example, I wrote a document and sent it to p4.Then I would like to share it on the company intranet or notify the rest by email.

I am creating a message and referring to the p4 document as a hyperlink in the message. When the user clicks on him, his local P4 will be launched to synchronize the document in accordance with his p4 configuration (it will not succeed if he cannot access the corresponding repo), then the document will be opened on his PC.

Having received this function, I'm just trying to find a solution for a simple document exchange p4. Since I do not want to upload documents to the intranet, then manually synchronize it between p4. Any suggestion is welcome. thanks.

+7
source share
3 answers

Another easy way is to set up your intranet web server to work with documents from a frequently executed workspace, as described here: http://www.perforce.com/customers/white_papers/web_content_management_perforce under "2. A simple WCM approach."

I used this mechanism with the Apache web server and the Perforce client workspace with a cron script, synchronizing the workspace every 10 seconds to exchange documents by URL in the development environment with dozens of active developers, quite successfully.

+3
source

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

Then you can install the handler in the p4v executable with the -s option. This will open the location, but it will not provide any synchronization.

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

You may also need to force the URL to a valid enforcement path. For example, window URLs will contain text before the colon, which will cause problems.

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

Therefore, you probably have to write a shell script around p4v execution to do some text filtering. These are all kinds of pain, so I did not do it myself.

+3
source

The only thing that comes to mind is P4Web , which serves to store Perforce over HTTP. It still won’t solve “sync automatically according to its p4 configuration”, but at least you can send links to your document.

+2
source

All Articles