#include <sourcecontrol.h>
Classes | |
struct | ChangeFiles |
struct | FileDiff |
Static Public Member Functions | |
static MAXON_METHOD Result< SourceControlInterface * > | Alloc (MAXON_SOURCE_LOCATION_DECLARATION, const String &portName=String(), const String &clientName=String(), const String &userName=String(), const String &passWord=String()) |
static MAXON_METHOD Result< Data > | SCConvertSkip (const CString &val) |
static MAXON_METHOD Result< Data > | SCConvertInt (const CString &val) |
static MAXON_METHOD Result< Data > | SCConvertInt32 (const CString &val) |
static MAXON_METHOD Result< Data > | SCConvertInt64 (const CString &val) |
static MAXON_METHOD Result< Data > | SCConvertFloat (const CString &val) |
static MAXON_METHOD Result< Data > | SCConvertFloat32 (const CString &val) |
static MAXON_METHOD Result< Data > | SCConvertFloat64 (const CString &val) |
static MAXON_METHOD Result< Data > | SCConvertDateTime (const CString &val) |
static MAXON_METHOD Result< Data > | SCConvertUrl (const CString &val) |
static MAXON_METHOD Result< Data > | SCConvertString (const CString &val) |
Private Member Functions | |
MAXON_INTERFACE_NONVIRTUAL (SourceControlInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.sourcecontrol") | |
|
private |
|
static |
Allocator for common use.
[in] | allocLocation | Pass MAXON_SOURCE_LOCATION(_NAME) to add the current source line and file. |
[in] | portName | Perforce ip address and port. E.g. "127.0.0.1:1666". If the string is empty the value from the perforce credentials is taken. |
[in] | clientName | Client workspace name. If the string is empty the value from the perforce credentials is taken. |
[in] | userName | Perforce user name to login. If the string is empty the value from the perforce credentials is taken. |
[in] | passWord | Perforce user password. If the string is empty the value from perforce credentials is taken. |
MAXON_METHOD Result<Url> CheckoutFile | ( | const Url & | path | ) |
Checks out a file from the source code control depot for editing.
[in] | path | Path pointing to a file in the source code control depot, e.g. perforce:///depot/... or pointing to a local file. |
MAXON_METHOD Result<void> SyncFile | ( | const Url & | path, |
Int | changeList = -1 , |
||
const ProgressMonitorRef & | monitor = GetZeroRef< ProgressMonitorRef >() |
||
) |
Gets the latest revision of a file from the source code control depot.
[in] | path | Path pointing to a file in the source code control depot, e.g. perforce:///depot/... or pointing to a local file. |
[in] | changeList | Change list to sync. -1 syncs to the latest change list. |
[out] | monitor | Optional handler to watch status throughout the time span of the sync operation. |
MAXON_METHOD Result<void> SyncFileRevision | ( | const Url & | path, |
Int | revision = -1 , |
||
const ProgressMonitorRef & | monitor = GetZeroRef< ProgressMonitorRef >() |
||
) |
Gets the a revision of a file from the source code control depot.
[in] | path | Path pointing to a file in the source code control depot, e.g. perforce:///depot/... or pointing to a local file. |
[in] | revision | The revision number to sync. -1 syncs to the latest revision. |
[out] | monitor | Optional handler to watch status throughout the time span of the sync operation. |
Gets the local revision number of files on depot.
[in] | path | Path pointing to a file in the source code control depot, e.g. perforce:///depot/..., could be a file or a folder. Passing a folder is faster then call the fucntion on any file in it. |
MAXON_METHOD Result<void> RevertFile | ( | const Url & | path | ) |
Reverts a (checked out) file to the latest revision from the source code control depot.
[in] | path | Path pointing to a file in the source code control depot, e.g. perforce:///depot/... or pointing to a local file. |
MAXON_METHOD Result<Url> GetNameOnDrive | ( | const Url & | path | ) |
Gets the local file name of a depot file.
[in] | path | Path pointing to a file in the source code control depot, e.g. perforce:///depot/... |
MAXON_METHOD Result<Int> SubmitChangelist | ( | const String & | description | ) |
Submits the current default changelist.
[in] | description | The description for the changelist. |
MAXON_METHOD Result<Url> AddFile | ( | const Url & | path | ) |
Adds a file to the current changelist.
[in] | path | Path of a local file that needs to be checked in. |
MAXON_METHOD Result<Url> DeleteFile | ( | const Url & | path | ) |
Deletes a file and adds this operation to the current changelist.
[in] | path | Path of a local file that needs to be deleted. |
MAXON_METHOD Result<Int> GetLastChange | ( | const Url & | path | ) |
Retrieves the last changelist of a given file.
[in] | path | Path of a local file or depot path. |
MAXON_METHOD Result<Bool> IsUnderSourceControl | ( | const Url & | path | ) |
Checks whether a file is under source control or not.
[in] | path | Path of a local file or depot path. |
MAXON_METHOD Result<void> IsUnderSourceControl | ( | const BaseArray< Url > & | paths, |
BaseArray< Bool > & | result | ||
) |
Checks whether multiple files are under source control or not. This is much faster than calling it for individual files.
[in] | paths | Array of paths of local files or depot paths. |
[out] | result | Array of boolean values. True indicates a file is under source control and the operation succeeded. |
MAXON_METHOD Result<void> GetBranchMappings | ( | BaseArray< String > & | branches | ) |
Queries the list of available branch mappings.
[out] | branches | The list that will be filled. |
MAXON_METHOD Result<void> GetBranchMapping | ( | const String & | name, |
BaseArray< String > & | view, | ||
String & | description, | ||
String & | owner | ||
) |
Retrieves data for an existing branch mapping.
[in] | name | The name of the branch mapping. |
[in] | view | The branch mapping's view entries. |
[in] | description | The branch mapping's description. |
[in] | owner | The branch mapping's owner. |
MAXON_METHOD Result<void> CreateBranchMapping | ( | const String & | name, |
const BaseArray< String > & | view, | ||
const String & | description, | ||
const String & | owner | ||
) |
Creates a new branch mapping or edits an existing one.
[in] | name | The name of the branch mapping. |
[in] | view | The branch mapping's view. |
[in] | description | The branch mapping's description. |
[in] | owner | The branch mapping's owner. |
MAXON_METHOD Result<void> DeleteBranchMapping | ( | const String & | name | ) |
Deletes an existing branch mapping.
[in] | name | The name of the branch mapping. |
MAXON_METHOD Result<void> GetChanges | ( | const Url & | path, |
Bool | longDescription, | ||
const String & | limitUser, | ||
Int | limitChanges, | ||
BaseArray< SourceControlChangeEntry > & | changes | ||
) |
Gets all of the changes of a given depotPath (file or directory).
[in] | path | Path of a local file/directory. |
[in] | longDescription | If true the functions returns the long description. Otherwise the shortened description. |
[in] | limitUser | Limit the output to a specific user. An empty string for no filtering. |
[in] | limitChanges | Limit the output to this number of changelists. 0 for no limits. |
[out] | changes | Receives the change lists in this variable. |
MAXON_METHOD Result<void> GetMissingIntegrations | ( | const String & | branchMapping, |
Int | checkChangelist, | ||
Bool | reverseMapping, | ||
Bool | longDescription, | ||
BaseArray< SourceControlChangeEntry > & | changes | ||
) |
Retrieves the missing integrations from one branch to another using the given branch mapping.
[in] | branchMapping | Branch Mapping to check. |
[in] | checkChangelist | Up to this changelist the check will be evaluated. This parameter can be 0 to get the missing integrations for the latest changelist. |
[in] | reverseMapping | If False the direction of the mapping is used. If true the opposite direction is calculated. |
[in] | longDescription | If true the functions returns the long description. Otherwise the shortened description. |
[out] | changes | Receives the change lists in this variable. |
MAXON_METHOD Result<void> DescribeChangelist | ( | Int | changelist, |
SourceControlChangeEntry * | change, | ||
BaseArray< ChangeFiles > * | files | ||
) |
Gets all of the changes of a given depotPath (file or directory).
[in] | changelist | Changelist to describe. |
[out] | change | Optional parameter to get the description of the changelist. |
[out] | files | Optional parameter to get the affected files and the differences. |
MAXON_METHOD Result<void> DiffFiles | ( | const Url & | file1, |
const Url & | file2, | ||
FileDiff & | diff | ||
) |
Compares 2 files of the depot against each other. Its also possible to compare 2 revisions of the same file.
[in] | file1 | File 1 to compare against file 2. |
[in] | file2 | File 2 to compare against file 1. |
[out] | diff | FileDiff structure filled if the operation was successful. |
MAXON_METHOD Result<void> ReadFile | ( | const Url & | file, |
WritableArrayInterface< UChar > & | content | ||
) |
Copies the content of the file into the given buffer.
[in] | file | File to read. |
[out] | content | Buffer that receives the content of the file. |
MAXON_METHOD Result<String> RunNativeCommand | ( | const String & | command, |
const ArrayInterface< String > & | arguments, | ||
WritableArrayInterface< DataDictionary > & | result, | ||
const ProgressMonitorRef & | monitor = GetZeroRef< ProgressMonitorRef >() , |
||
const SCTypeConversion & | typeConversion = SCTypeConversion() , |
||
const String & | input = String() |
||
) |
Runs a native perforce command, the result is placed within a DataDictionary.
[in] | command | Command to execute. |
[in] | arguments | Arguments passed to this command. |
[out] | result | Result array with the answer. |
[out] | monitor | Optional handler to watch status throughout the time span of the SCC command. |
[in] | typeConversion | Optional HashSet with conversion from perforce types to Data. |
[in] | input | Optional string that feeds the SCC command with input data. |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |