<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://stlab.adobe.com/wiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://stlab.adobe.com/wiki/index.php?title=Configuring_Perforce_client_for_two_servers&amp;feed=atom&amp;action=history</id>
		<title>Configuring Perforce client for two servers - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://stlab.adobe.com/wiki/index.php?title=Configuring_Perforce_client_for_two_servers&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://stlab.adobe.com/wiki/index.php?title=Configuring_Perforce_client_for_two_servers&amp;action=history"/>
		<updated>2013-05-23T06:20:35Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.0</generator>

	<entry>
		<id>http://stlab.adobe.com/wiki/index.php?title=Configuring_Perforce_client_for_two_servers&amp;diff=1451&amp;oldid=prev</id>
		<title>FosterBrereton: initial population</title>
		<link rel="alternate" type="text/html" href="http://stlab.adobe.com/wiki/index.php?title=Configuring_Perforce_client_for_two_servers&amp;diff=1451&amp;oldid=prev"/>
				<updated>2006-06-21T22:58:25Z</updated>
		
		<summary type="html">&lt;p&gt;initial population&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Here is one example of a strategy for working with perforce to merge some of the contents of &lt;br /&gt;
depots on two separate servers into one directory tree in a client workspace.&lt;br /&gt;
Suppose, for example, that we are working with two depots names //submission, one on a &lt;br /&gt;
perforce server named opensource, and the other on a server called boxer. Further, we want to take &lt;br /&gt;
part of the contents of boxer and merge it into the directory synced from opensource. In particular &lt;br /&gt;
we want //submission/third_party from boxer to behave as if it came from opensource.&lt;br /&gt;
&lt;br /&gt;
1) create client specs which map files to the right place on the client machine.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### opensource clientspec&lt;br /&gt;
//submission/... //opensource-client-spec/C:/opensource/submission/...&lt;br /&gt;
&lt;br /&gt;
### boxer clientspec&lt;br /&gt;
//submission/... //boxer-client-spec/C:/boxer/submission/...&lt;br /&gt;
//submission/third_party/... //boxer-client-spec/C:/opensource/submission/third_party/...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) It can be quite helpful to use the p4config mechanism. Instead of the single-server strategy of &lt;br /&gt;
setting the P4PORT and P4CLIENT environment variables, one sets the variable P4CONFIG. It is &lt;br /&gt;
set to the name of a text file that may be present on disk. I use the name p4config. Now, when a &lt;br /&gt;
perforce command is issued from a given working directory, p4 searches for a p4config file in the &lt;br /&gt;
current directory, or if not found in successive parent directories. Once a file is found p4 looks &lt;br /&gt;
inside for the setting of any number of variables. This is where I set P4PORT and P4CONFIG. In &lt;br /&gt;
the current example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
### C:/opensource/p4config contains:&lt;br /&gt;
P4PORT=opensource.adobe.com:10666&lt;br /&gt;
P4CLIENT=mmarcus-pc&lt;br /&gt;
P4USER=mmarcus&lt;br /&gt;
&lt;br /&gt;
### C:/opensource/submission/third_party/p4config (and C:/boxer/p4config) contains:&lt;br /&gt;
P4PORT=boxer.corp.adobe.com:1770&lt;br /&gt;
P4CLIENT=mmarcus-pc&lt;br /&gt;
P4USER=mmarcus&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's it. Now if I cd to C:/opensource/submission and p4 sync I'll get files from opensource, but if I cd to C:/opensource/submission/third_party the files will come from boxer.&lt;/div&gt;</summary>
		<author><name>FosterBrereton</name></author>	</entry>

	</feed>