perforce - Is there a mapping between a workspace and it's depot? -


is there mapping between workspace , depot in perforce? example if have workspace created on d:/myworkspace can run perforce command find depot created?

if have connection perforce server simple; run command p4 //... or p4 client -o see depot(s) associated current client workspace.

if you're connected perforce server connection settings don't include name of workspace might associated current directory, you'll need use p4 clients command , match host value client hostname, , root values match directory. note it's possible have multiple matches -- people things create client no host value (allowing used host) and/or null root value (allowing map directory).

if don't know address of perforce server , it's not set in environment might out of luck; perforce commands automatically pick p4port setting system environment, registry, p4config files, etc, there isn't guarantee given perforce client machine have connection set via 1 of these mechanisms (in perverse case, might specify p4port on every command via -p global flag).


when scripting perforce commands reasonable assume correctly configured environment includes valid p4port/p4user/p4client settings, , error out if user hasn't provided those. script run within shell user using p4 cli have correctly configured environment, script run p4v "custom tool".


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -