ServerHelperApi::PrepareToCloneFilepath(ServerHelperApi*,const char*,ClientUser*,Error*)
Creates a remote specification based on the provided filepath.
Virtual? |
No |
|
Class |
||
Arguments |
|
ServerHelperApi object representing the shared server |
|
depot path to clone |
|
|
an Error object |
|
Returns |
|
returns 1 if successful |
Notes
This creates a new remote spec based on the provided filepath. It also
checks that p4 fetch
is allowed on the remote server
specified.
See also
ServerHelperApi::PrepareToCloneRemote()
Example
ServerHelperApi remoteServer( &e ); remoteServer.SetPort( "1666" ); remoteServer.SetProg( "MyApp" ); // optional remoteServer.SetVersion( "1.0" ); // optional // Generate the remote spec if( !localServer.PrepareToCloneFilepath( &remoteServer, path, &ui ) ) return 0; // Create the local server // This returns the exit code from p4d, so 0 is success if( localServer.InitLocalServer( &ui ) ) return 0; // Fetch from the remote if( !localServer.CloneFromRemote( 0, 0, &ui ) ) return 0;