Multiple VCS roots; Perforce
Hi,
I have the same problem as described here: http://devnet.jetbrains.net/message/5305178#5305178, except my VCS is Perforce. When using agent-side checkout, only the last VCS gets checked out.
Can you please confirm this is not an option with Perforce either?
And, if so, what is the reason? I can see why this may not work with SVN (the .svn file), but what's the reason with Perforce?
Thanks,
Sam
Also related: http://devnet.jetbrains.net/message/5253176#5253176 (same problem, TFS)
Please sign in to leave a comment.
Hello Samuel,
Sorry for the delayed response.
When using checkout on agent, TeamCity creates real perforce workspaces which point to the target directories according to VCS settings and checkout rules.
And perforce disallows having the same target directory for different workspaces.
The workaround is to use checkout on server mode for the configurations.
Hope this helps,
KIR
Hi Kirill,
thanks for the reply. I am afraid I still don't understand/agree. This is *not* the case of two workspaces having the same target directory.
Please consider the following setup:
workspace "test-a"
Root: c:\temp\p4test
View:
//depot/some/path/... //test-a/a/...
workspace "test-b"
Root: c:\temp\p4test
View:
//depot/other/path/... //test-b/b/...
These co-exist without any problems on my machine, despite having the same root (c:\temp\p4test). One will check out files to c:\temp\p4test\a, the other into c:\temp\p4test\b:
c:\
+ temp
+ p4test
+ a
+ files from //depot/some/path
+ b
+ files from //depot/other/path
Why shouldn't the same be possible on a TeamCity agent? (The only difference I see is that in all the co-existing workspaces on a TC, we refer to the root as //team-city-agent.)
Thanks,
Sam
Hello Sam,
Could you probably describe you failing configuration in more detail? What are your settings for VCS roots, checkout rules, and which error do you get?
Thanks,
KIR
I have a build configuration with two VCS roots attached. The mapping is defined similar as per my previous post (one root is equivalent to test-a, the other to test-b). I have no checkout rules defined for either of the VCS roots.
I expect that when I run the build, the situation on the disk should be as follows:
[team-city-agent]
+ a
+ files from //depot/some/path
+ b
+ files from //depot/other/path
However, with VCS checkout mode = 'Automatically on agent', this is not the case. Instead, the disk looks as follows:
[team-city-agent]
+ b
+ files from //depot/other/path
Only one of the VCS roots is checked out. (If I have three VCS roots, again, only the last one is checked out, the other two disappear.)
It seems like the checkout of the last VCS root empties team-city-agent before the checkout, when instead it should only empty its own subdirectory, team-city-agent/b.
I guess this matches the situation described here: http://devnet.jetbrains.net/message/5305178#5305178. All gets well when using VCS checkout mode = 'Automatically on server'.
I understand that the behaviour I need may not be achievable with SVN, but I would expect this to work with Perforce.
Does that explain it better?
Hello Samuel,
Thanks for the problem description. I've reproduced it locally and filed to the tracker: http://youtrack.jetbrains.net/issue/TW-17555
Please watch it, I hope to fix it soon.
Kind regards,
KIR
Great, thank you.