0

When I do a Perforce vcs root checkout on teamcity agent, I see that a workspace which starts with "TC_p4_" gets created but I cannot find this folder on my agent. Where is the mapping of this "TC_p4_" being done in Teamcity? I do not have any checkout rules enabled for the vcs root in teamcity.

My vcsroot client mapping settings look as follows in teamcity:
//vcsroot/stream_name/... //team-city-agent/...

Also when I do a checkout, revert or submit on the Perforce stream used in vcs root using p4 command line commands like p4 sync, p4 revert etc , I keep getting the following error in Teamcity.

warning: cannot submit from non-stream client

Can someone please help me with what I'm missing here. Appreciate any kind of pointers and help through your responses!

Jose
  • 1,333
  • 5
  • 20
  • 38

2 Answers2

2

Start by looking at the details of the client. You don't need to do this on the TC agent - any box connecting to your P4 server will do. You options are:

  1. in P4V, press Ctrl-G > choose Workspace > enter the TC_p4_... name.
  2. in p4 the cmdline client, run p4 client -o TC_p4_....

Either of these will show you the "Root" of the workspace (as well as the "Host", which should be your TC agent's hostname). That will give you a hint where to look on the agent.

Now, I suspect you can't sync, revert, etc. because when you run these commands, your environment is not set up properly. Instead of p4 sync and similar, try running p4 set. Does it correctly identify the server (P4PORT) and the client (TC_p4_...)? If not, you'll have to fix this first, which can be done a number of ways.

Community
  • 1
  • 1
sferencik
  • 3,144
  • 1
  • 24
  • 36
  • So, I was able to figure out the TC_P4 mapping using the above answer, Thanks sferencik. – Jose Mar 14 '17 at 18:31
  • But still unable to figure the issue with the p4 submit which keeps on warning me as "warning: cannot submit from non-stream client" and then ends up with an error "No files to submit. Submit failed -- fix problems above then use 'p4 submit -c ". – Jose Mar 14 '17 at 18:40
  • I checked the P4CLIENT and P4PORT settings and they are all correct, Teamcity populates these parameters at run time with the generated Teamcity Workspace name and there are no issues in setting these variables. Looks like there is something wrong in the commands that I use to submit. Following are the commands that I use to submit 1. p4 -p %PerforceServer% -u revert -a 2. p4 -p %PerforceServer% -u submit -d "description" – Jose Mar 14 '17 at 18:40
0

The Solution was to create a vcs root in Teamcity with the P4 connection as a stream, rather than using a client mapping while creating the vcs root to perform perforce submit, revert, sync etc and not to get the error "warning: cannot submit from a non-stream client"

https://confluence.jetbrains.com/display/TCD9/Perforce

Jose
  • 1,333
  • 5
  • 20
  • 38