简体   繁体   中英

Accessing an existing P4 connection from p4api.net?

I've created a small console application using p4api.net which builds a changelist of files having particular attributes. So far so good, but it's unable to connect if I already have an existing connection open (like if I have an open instance of P4V, for example).

Is there a way to attach to an existing P4 connection, rather than having to close that connection and create a new one within my app?

The issue seems to be that I was attempting to create a new connection to a repository I was already connected to. I found that if I leave the port/server, client/workspace, and user fields as empty strings when initializing the connection it would take those settings from my P4 environment variables and connect correctly, regardless of whether I had a connection already open or not.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM