I'm using TC 9.0.1. I have a build with 2 VCS roots with direct mappings in TC GUI that uses agent-side checkout. Let's say the roots are called MM and FC. MM was created first. VCS roots point to different Perforce servers. When I run the build, both roots are synced as expected. First, MM is synced, followed by FC. The sources update for MM sets P4 env variables like this:
[09:44:08][VCS Root: MM] Setting P4USER environment variable to mm
[09:44:08][VCS Root: MM] Setting P4PORT environment variable to p4server1:1666
[09:44:08][VCS Root: MM] Setting P4CLIENT environment variable to TC_p4_BUILDPC_83fd80896463e8f3_35aceced75ff3d09
I would like to have FC root actually set those variables because I want to do some p4 operations against the Perforce server it touches. I tried detaching and attaching the roots to change the order, but that had no impact.
1. Is the order of root sync based on when the roots were created (i.e. oldest first)?
2. Is there a way to control which root sets the p4 env variables?
3. What determines the client mapping being written to the P4CLIENT? No matter what I tried, it was always the lines from MM that went into the workspace, but I need the lines from FC.