ScriptSvnProjectServices

class ScriptSvnProjectServices.SvnProjectServices

Bases: object

Contains all Svn functionality which is bound to a working copy / versioned project.

IncludeExternals(parentObject, url, revision, reporter)

Includes an svn:externals directory tree.

Parameters:
  • parentObject (SvnObjectId) – The parent object, or null if you want to include it top level.

  • url (Uri) – The URL. (Currently, only absolute URLs are allowed, this will change

in the future. Peg revisions are allowed.)

Parameters:
  • revision (SvnRevision) – The revision, or null for an unversioned reference.

  • reporter (SvnReporter) – The Reporter.

DisconnectProject(nProjectHandle, reporter)

Disconnects the project from subversion.

Parameters:
  • nProjectHandle (int) – The project handle.

  • reporter (SvnReporter) – The Reporter.

Switch(nProjectHandle, newUrl, revision, reporter)

Switches the specified project handle to a different location (branch / tag).

Parameters:
  • nProjectHandle (int) – The project handle.

  • newUrl (Uri) – The new URL.

  • revision (SvnRevision) – The revision.

  • reporter (SvnReporter) – The reporter.

IsExternal(id)

Determines whether the specified object is external.

Parameters:

id (SvnObjectId) – The object id.

Return type:

bool

Returns:

True if the specified n project handle is external; otherwise, False.

Resolved(objectIds, reporter)

Marks subversion conflicts as resolved.

Parameters:
  • objectIds (list[SvnObjectId]) – The object ids. To guarantee consistency, you should pass this selection through SvnProjectServices.VerifySelection before calling.

  • reporter (SvnReporter) – The Reporter.

Resolve(objectId, resolution, reporter)

Resolves a subversion conflict

Parameters:
  • objectId (SvnObjectId) – The object to resolve. To guarantee consistency, you should pass this selection through SvnProjectServices.VerifySelection before calling.

  • resolution (SvnResolution) – The resolution to apply to the conflict.

  • reporter (SvnReporter) – The Reporter.

RevalidateLocks(nProjectHandle, reporter)

Checks all locks against the server, and releases all locks which have been broken, stolen or obsoleted in the given project.

Parameters:
  • nProjectHandle (int) – The project handle.

  • reporter (SvnReporter) – The Reporter.

AddToChangeList(objectIds, stChangelist, reporter)

Adds or moves objects to a given changelist.

Parameters:
  • objectIds (list[SvnObjectId]) – The object ids. To guarantee consistency, you should pass this selection through SvnProjectServices.VerifySelection before calling.

  • stChangelist (str) – The changelist name.

  • reporter (SvnReporter) – The Reporter.

RemoveFromChangelist(objectIds, reporter)

Removes objects from changelist.

Parameters:
  • objectIds (list[SvnObjectId]) – The object ids. To guarantee consistency, you should pass this selection through SvnProjectServices.VerifySelection before calling.

  • reporter (SvnReporter) – The Reporter.

GetChangelistNames(nProjectHandle, reporter)

Gets all changelists.

Parameters:
  • nProjectHandle (int) – The project handle.

  • reporter (SvnReporter) – The Reporter.

Return type:

list[str]

Returns:

All the changelists which currently exist in the project

GetChangelistContents(nProjectHandle, changelists, reporter)

Gets the objects of a set of changelists.

Parameters:
  • nProjectHandle (int) – The project handle.

  • changelists (list[str]) – The changelists.

  • reporter (SvnReporter) – The Reporter.

Return type:

list[SvnObjectInfo]

Returns:

All the objects currently contained in the named changelists.

GetChangelist(objectId, reporter)

Gets the changelist of a given object, or null if the object is not member of a changelist.

Parameters:
  • objectId (SvnObjectId) – The object id.

  • reporter (SvnReporter) – The Reporter.

Return type:

str

Returns:

The changelist the object is member of.

GetPropertyList(objectId, revision, bRecursive, reporter)

Gets the property list.

Parameters:
  • objectId (SvnObjectId) – The object id.

  • revision (SvnRevision) – The revision.

  • bRecursive (bool) – if set to True, all subobjects are processed recursively.

  • reporter (SvnReporter) – The reporter.

Return type:

list[SvnPropertyList]

GetPropertyValues(objectId, revision, bRecursive, stPropertyName, reporter)

Gets the property values.

Parameters:
  • objectId (SvnObjectId) – The object id.

  • revision (SvnRevision) – The revision.

  • bRecursive (bool) – if set to True, all subobjects are processed recursively.

  • stPropertyName (str) – Name of the st property.

  • reporter (SvnReporter) – The reporter.

Return type:

dict(SvnObjectInfo, SvnPropertyValue)

SetPropertyValue(objectId, bRecursive, stPropertyName, propertyValue, reporter)

Sets the property value.

Parameters:
  • objectId (SvnObjectId) – The object id.

  • bRecursive (bool) – if set to True, all subobjects are processed recursively.

  • stPropertyName (str) – Name of the st property.

  • propertyValue (SvnPropertyValue) – The property value.

  • reporter (SvnReporter) – The reporter.

DeleteProperty(objectId, bRecursive, stPropertyName, reporter)

Deletes the property.

Parameters:
  • objectId (SvnObjectId) – The object id.

  • bRecursive (bool) – if set to True, all subobjects are processed recursively.

  • stPropertyName (str) – Name of the st property.

  • reporter (SvnReporter) – The reporter.

GetObjectAtRevision(objectRevisionContext, objectId, revision, mode, reporter)

Gets the object at a given revision.

Parameters:
  • objectRevisionContext (Guid) – The object revision context.

  • objectId (SvnObjectId) – The object id.

  • revision (SvnRevision) – The revision.

  • mode (SvnObjectRevisionMode) – The mode to create the temporary object context.

  • reporter (SvnReporter) – The Reporter.

Return type:

MetaObjectStub

Returns:

The meta object stub.

GetDiffSummary(nProjectHandle, leftRevision, rightRevision, bIgnoreAncestry, reporter)

Gets a diff summary.

Parameters:
  • nProjectHandle (int) – The project handle.

  • leftRevision (SvnRevision) – The left revision.

  • rightRevision (SvnRevision) – The right revision.

  • bIgnoreAncestry (bool) – if set to True, the ancestry is ignored.

  • reporter (SvnReporter) – The Reporter.

Return type:

SvnDifference

Returns:

The svn differences.

GetWcRootDir(nProjectHandle)

Gets the working copy root directory.

Parameters:

nProjectHandle (int) – The project handle.

Return type:

str

Returns:

null if the project is not under source control.

IsVersioned(objectId)

Determines whether the specified object is versioned.

Parameters:

objectId (SvnObjectId) – The object id.

Return type:

bool

Returns:

True if the specified object id is versioned; otherwise, False.

Add(objectIds)

Adds the specified unversioned object ids to the version control.

Parameters:

objectIds (list[SvnObjectId]) – The object ids. To guarantee consistency, you should pass this selection through SvnProjectServices.VerifySelection before calling.

HasWorkingCopyData(nProjectHandle)

Determines whether the given Project has a working copy data stream.

Parameters:

nProjectHandle (int) – The project handle.

Return type:

bool

Returns:

True if the project has working copy data; otherwise, False.

IsSubversionActive(nProjectHandle)

Determines whether subversion is active for the specified project handle. This returns true when SvnProjectServices.GetWcRootDir returns a valid working directory.

Parameters:

nProjectHandle (int) – The project handle.

Return type:

bool

Returns:

True if subversion is active for the specified project handle; otherwise, False.

ActivateSubversion(nProjectHandle, reporter)

Activates the subversion services for the given project.

Parameters:
  • nProjectHandle (int) – The project handle.

  • reporter (SvnReporter) – The reporter.

Return type:

bool

Returns:

True if the activation was successfull, false if it was already active. Throws “InvalidOperationException” if the project does not have a valid working copy data stream.

GetInfo(objectId, revision, depth, changeLists, reporter)

Returns more information about an object in the working copy.

Parameters:
  • objectId (SvnObjectId) – The object id.

  • revision (SvnRevision) – The revision.

  • depth (SvnDepth) – The depth.

  • changeLists (list[str]) – The change lists.

  • reporter (SvnReporter) – The reporter.

Return type:

list[SvnInfo]

HasTreeConflict(id)

Determines whether the object has a tree conflict.

Parameters:

id (SvnObjectId) – The id.

Return type:

bool

Returns:

True if there is a tree conflict; otherwise, False.

GetLog(objectId, revisionRange, nLimit, bStopOnCopy, bRetrieveAllProperties, reporter)

Queries subversion log entries.

Parameters:
  • objectId (SvnObjectId) – The object id for the object to query.

  • revisionRange (SvnRevisionRange) – The revision range.

  • nLimit (int) – The maximum number of log entries.

  • bStopOnCopy (bool) – if set to True, stop on copy operations.

  • bRetrieveAllProperties (bool) – if set to True, all revision properties are fetched.

  • reporter (SvnReporter) – The reporter.

Return type:

list[SvnLogInfo]

Returns:

The list of log entries.

ConnectProject(nProjectHandle, url, revision, bOmitExternals, reporter)

Imports the project into an existing subversion repository.

Parameters:
  • nProjectHandle (int) – The handle of the project to import.

  • url (Uri) – The subversion URL where to import the project.

  • revision (SvnRevision) –

  • bOmitExternals (bool) – if set to True, externals are omitted.

  • reporter (SvnReporter) – The Reporter or null.

Merge(nProjectHandle, url, revisionRange, flags, reporter)

Merges changes from a different branch.

Parameters:
  • nProjectHandle (int) – The handle.

  • url (Uri) – The URL.

  • revisionRange (list[SvnRevisionRange]) – The revision range. Do not pass any revisions for –reintegrate merges.

  • flags (SvnMergeFlags) – Flags for the merge.

  • reporter (SvnReporter) – The message view reporter.

VerifySelectionReported(action, ids, urlsAndRevisions, reporter)

HelperMethod for VerifySelection: Verifies a given SvnObjectID, and reports occuring changes to the given ISvnReporter.

Parameters:
  • action (SvnSelectionVerificationAction) – The action.

  • ids (list[SvnObjectId]) – The ids.

  • urlsAndRevisions (SvnSelectionVerificationUrlAndRevisionData) – For SvnSelectionVerificationAction.IncludeExternals, the caller must provide an instance which is able to resolve Urls and revisions for all SvnObjectId instances given in ids. After the call, the variable will point to an instance which knows how to resolve all SvnObjectId instances in the returned. For other values of action, null has to be passed.

  • reporter (SvnReporter) – The reporter.

Return type:

list[SvnObjectId]

Returns:

The verified selection, or null if no solution was found.

GetProjectConfiguration(nProjectHandle)

Gets the project specific configurations.

Parameters:

nProjectHandle (int) – The project handle.

Return type:

SvnProjectConfiguration

Returns:

The project specific configuration object. The returned instance remains valid as long as the project is open.

GetVersionSummary(nProjectHandle, trailUri=None, reporter=None)

Gets the version summary.

Parameters:
  • nProjectHandle (int) – The n project handle.

  • trailUri (Uri) – If trailUri is non-NULL, use it to determine if local_abspath itself is switched. It should be any trailing portion of the working copy roots expected URL, long enough to include any parts that the caller considers might be changed by a switch. If it does not match the end of the working copy roots actual URL, then report a “switched” status.

  • reporter (SvnReporter) – The reporter.

Return type:

SvnWorkingCopyVersionSummary

Returns:

The version summary of the working copy.

CheckObjectsPreventingSafeMerge(nProjectHandle, reporter)

Checks whether the working copy is in a “safe” state for merging.

Parameters:
  • nProjectHandle (int) – The project handle.

  • reporter (SvnReporter) – The reporter.

Return type:

str

Returns:

A string explaining why the project cannot be merged, or null if there is no obstacle.

GetSvnConflictsInfo(id, reporter)

Gets the SVN conflicts info for a specific object (non-recursively).

Parameters:
  • id (SvnObjectId) – The id.

  • reporter (SvnReporter) – The reporter.

Return type:

SvnConflictsInfo

GetStatus(objectId, flags=SvnGetStatusFlags.RetrieveAllEntries, depth=SvnDepth.Infinity, changeLists=None, reporter=None)

Queries the subversion status.

Parameters:
  • objectId (SvnObjectId) – The object id.

  • flags (SvnGetStatusFlags) – The flags.

  • depth (SvnDepth) – The wanted subversion depth.

  • changeLists (list[str]) – The change lists. If set and not empty, only those child elements which are members of the

mentioned changelists are cinluded during recursive operations.

Parameters:

reporter (SvnReporter) – The Reporter.

Return type:

list[SvnStatusInfo]

Returns:

A list of all found Subversion status infos.

Commit(objectIds, stMessage, bKeepLocks, bKeepChangelists, depth, changeLists, reporter)

Commits the specified objects in the given project.

Parameters:
  • objectIds (list[SvnObjectId]) – The object ids. To guarantee consistency, you should pass this selection through SvnProjectServices.VerifySelection before calling.

  • stMessage (str) – The commit message.

  • bKeepLocks (bool) – if set to True, local locks are kept.

  • bKeepChangelists (bool) – if set to True, changelists are kept.

  • depth (SvnDepth) – The depth.

  • changeLists (list[str]) – The change lists. If set and not empty, only those child elements which are members of the mentioned changelists are inluded during recursive operations.

  • reporter (SvnReporter) – The Reporter.

ChangeLocation(id, stNewLocation, reporter)

Changes the location of an SvnItemType.ObjectDirectory to a different directory name via “svn move”.

Parameters:
  • id (SvnObjectId) – The id.

  • stNewLocation (str) – The new location.

  • reporter (SvnReporter) – The Reporter.

Return type:

SvnObjectId

Returns:

The object ID pointing to the new path.

CheckLocation(id, stNewLocation, reporter)

Checks a new location for CheckLocation.

Parameters:
  • id (SvnObjectId) – The id.

  • stNewLocation (str) – The new location.

  • reporter (SvnReporter) – The Reporter.

Throws “Exception” explaining why the new location is not allowed.

VerifySelection(action, userWantsToSelect, userWantsToDeSelect, selectedBeforeUserChange, urlsAndRevisions, finalSelection, addedByHooks, removedByHooks, args)

Verifies a selection for a working copy modifying operation. Some Plugins need to ensure conistency between multiple objects, and this requires that certain SVN operations can only be processed on specific groups of objects.

Parameters:
  • action (RcsSelectionVerificationAction) – The operation we want to verify the selection for.

  • userWantsToSelect (list[SvnObjectId]) – The initial selection of objects we want to verify, or the objects the user wants to add to the selection.

  • userWantsToDeSelect (list[SvnObjectId]) – The objects user wants to deselect, or empty.

  • selectedBeforeUserChange (list[SvnObjectId]) – The objects which have been selected before the user klicked to change the selection, or empty if no object was selected previously.

  • urlsAndRevisions (SvnSelectionVerificationUrlAndRevisionData) – For SvnSelectionVerificationAction.IncludeExternals, the caller must provide an instance which is able to resolve Urls and revisions for all SvnObjectId instances given in userWantsToSelect and selectedBeforeUserChange. After the call, the variable will point to an instance which knows how to resolve all SvnObjectId instances in the finalSelection collection. For other values of action, null has to be passed.

  • finalSelection (list[SvnObjectId]) – The final selection, or null if non non-colliding selection

was found.

Parameters:
  • addedByHooks (list[SvnObjectId]) – The objects added by hooks.

  • removedByHooks (list[SvnObjectId]) – The objects removed by hooks.

  • args (RcsSelectionVerificationArgs) – The args, for more fine-grained analysis.

Return type:

DialogResult

Returns:

DialogResult.OK if the initial selection was ok without changes. DialogResult.Yes if a non-colliding selection was found. DialogResult.Abort if no non-colliding solution was found.

CheckoutProject(url, revision, stProjectPath, stProjectName, flags, updateFlags, reporter, engineProjectAttributes)

Creates a new project and fills it with the contents from the given Subversion URL.

Parameters:
  • url (Uri) – The Subversion URL where to find the projects contents.

  • revision (SvnRevision) – The revision to check out.

  • stProjectPath (str) – The project path for the project file to save.

  • stProjectName (str) – Name of the project.

  • flags (SvnCheckOutFlags) – The flags.

  • reporter (SvnReporter) – The Reporter.

  • updateFlags (SvnVersionUpdateFlags) – The update flags for the VersionCompatibilityManager2. This parameter is currently only effective if the datasource based mechanism is used on a primary project, and silently ignored otherwise.

  • engineProjectAttributes (list[Guid]) – Additional engine ProjectAttributes. Attributes conflicting with the flags may lead to an exception or otherwise undefined behaviour, ProjectAttributes.Primary is automatically set based on the flags.

Return type:

bool

Returns:

The project handle of the new project, or -1 if the user cancelled the checkout, for example when this would override an existing project. Throws “ArgumentOutOfRangeException” describing why the current combination of checkout flags is not allowed. Throws “Exception” for any other exception happening during the checkout.

property DefaultCheckoutFlags

Gets the current default set of default checkout flags.

Return type:

SvnCheckOutFlags

Returns:

The default checkout flags.

ValidateCheckoutFlags(flags)

Validates the checkout flags, giving a user readable representation of which flags will currently lead to a failure. E. G., SvnCheckoutFlags.ForceProjectSource will fail with a CODESYS version older than V3.5.4.0 (not providing the projectsource mechanism), and is mutually exclusive with SvnCheckoutFlags.ForceAddMultipleObjects.

Parameters:

flags (SvnCheckOutFlags) – The flags.

Throws “ArgumentOutOfRangeException” describing why the current combination of checkout flags is not allowed.

Lock(objectIds, stMessage, bStealLocks, bRecursive, reporter)

Locks the specified object IDs.

Parameters:
  • objectIds (list[SvnObjectId]) – The object ids. To guarantee consistency, you should pass this selection through SvnProjectServices.VerifySelection before calling.

  • stMessage (str) – The lock message.

  • bStealLocks (bool) – if set to True, locks by others are broken / stolen.

  • bRecursive (bool) – if set to True, subnodes are recursively locked.

  • reporter (SvnReporter) – The Reporter.

Unlock(objectIds, bRecursive, reporter)

Releases the locks for the specified objects.

Parameters:
  • objectIds (list[SvnObjectId]) – The object ids. To guarantee consistency, you should pass this selection through SvnProjectServices.VerifySelection before calling.

  • bRecursive (bool) – if set to True, subnodes are recursively unlocked.

  • reporter (SvnReporter) – The Reporter.

GetProjectAtRevision(objectRevisionContext, nProjectHandle, revision, reporter)

Gets the project at a given revision.

Parameters:
  • objectRevisionContext (Guid) – The object revision context.

  • nProjectHandle (int) – The Project we need to get at the revision.

  • revision (SvnRevision) – The revision.

  • reporter (SvnReporter) – The Reporter.

Return type:

bool

Returns:

The projecthandle. (This may be the original projecthandle for SvnRevisionType.Working.)

GetRcsProjectTree(projectHandle)

Gets an RCS project tree - this tree is a snapshot, and will get invalidated by the next SVN or CODESYS Object Manager operation on the same project.

Parameters:

projectHandle (int) – The project handle.

Return type:

RcsVirtualProject

Returns:

The current RCS Project tree.

GetObjectIdFor(node)

Gets the object identifier for an RCs project node.

Parameters:

node (RcsVirtualProjectNode) – The node.

Return type:

SvnObjectId

GetRcsVirtualNode(info)

Gets the RCS virtual node for an SVN object info

Parameters:

info (:class:`SvnObjectInfo `) – The information.

Return type:

RcsVirtualProjectNode

Returns:

The RCS node.

IsUpToDate(node)

Determines whether the specified node is still up to date.

Parameters:

node (RcsVirtualProjectNode) – The node.

Return type:

bool

Returns:

True if the node is up to date.

GetObjectInfoFor(id)

Gets the object identifier for an RCs project node.

Parameters:

id (SvnObjectId) – The object id.

Return type:

SvnObjectInfo

GetPsNodeFor(id)

Gets the ps node for a given object id. (This might be an SvnDeletedPSNode.)

Parameters:

id (SvnObjectId) – The identifier.

Return type:

PSNode

CleanUp(nProjectHandle, whatToClean, reporter)

Executes an SVN Cleanup on the working copy. In SVN 1.7 and newer, unfortunately, the pristine storages tends to bloat, and an explicit Cleanup is the only way to trim the working copy back to normal size. Currently, CleanUp(self) is implicitly called on project save operations.

Parameters:
  • nProjectHandle (int) – The project handle.

  • whatToClean (CleanUpFlags) – The flags designating which things to clean. Passing

CleanUpFlags.None here still tries to clean up the working queue of incomplete operations.

Parameters:

reporter (SvnReporter) – The Reporter.

Copy(nProjectHandle, newUrl, stCommitMessage, revision=None, reporter=None)

Copies the specified project to a different location (create a branch or tag).

Parameters:
  • nProjectHandle (int) – The project handle.

  • newUrl (Uri) – The new URL.

  • stCommitMessage (str) – The commit message.

  • revision (SvnRevision) – The revision.

  • reporter (SvnReporter) – The reporter.

ResynchronizeProject(nProjectHandle, reporter=None)

Resynchronizes the project. This can be used to repair inconsistencies. If this is necessary in reproducible situations, you should file a bug report.

Parameters:
  • nProjectHandle (int) – The project handle.

  • reporter (SvnReporter) – The reporter.

SynchronizeProjectProfile(nProjectHandle, forceRewrite=True, reporter=None)

Forces resynchronization of the project storage profile file (“meta.profile”) and objects to the working copy. Might be necessary if one changes the storage profile at an uncommon time via AP interfaces, and wants to force the synchronization of the profile.

Parameters:
  • nProjectHandle (int) – The project handle.

  • forceRewrite (bool) – Forces the rewriting of all files. Set it to false to upgrade just the profile file.

  • reporter (SvnReporter) – The reporter.

SynchronizeProfileFileSchedule(nProjectHandle, reporter=None)

Forces resynchronization of the SVN schedule of the project storage profile file (“meta.profile”) to the working copy. Might be necessary to make sure the svn status of the profile file is up to to date right now. (It will be automatically updated at certain points in time, including just before commit.)

Parameters:
  • nProjectHandle (int) – The project handle.

  • reporter (SvnReporter) – The reporter.

ImportProject(nProjectHandle, url, stMessage, versionInfoMode, reporter)

Imports the project into an existing subversion repository.

non-existing directory with an existing parent directory. In the latter case, the directory will be created.

Parameters:
  • nProjectHandle (int) – The handle of the project to import.

  • url (Uri) – The subversion URL where to import the project.

  • stMessage (str) – The commit message for the import.

  • versionInfoMode (SvnVersionInfoMode) – The version info mode.

  • reporter (SvnReporter) – The Reporter or null.

VerifySelectionForUpdateReported(ids, revision, recursive=True, omitExternals=False, reporter=None)

HelperMethod for VerifySelection: Verifies a given colleciton of SvnObjectIDs, and reports occuring changes to the given ISvnReporter. This method is specific for update operations, and will both verify local and remote dependencies.

Parameters:
  • ids (list[SvnObjectId]) – The object ids we want to update.

  • revision (SvnRevision) – The destination revision we want to update.

  • recursive (bool) – Whether the operation is recursive.

  • omitExternals (bool) – Whether externals are to be included.

  • reporter (SvnReporter) – The reporter. May be None for non-reported operation.

Return type:

list[SvnObjectId]

Returns:

The verified selection, or null if no non-conflicting solution was found.

Revert(objectIds, revision, reporter, recursively)

Reverts the specified objects to a given revision.

Parameters:
  • objectIds (list[SvnObjectId]) – The object ids to revert. To guarantee consistency, you should pass this selection through SvnProjectServices.VerifySelection before calling.

  • revision (SvnRevision) – The revision to revert back to.

  • reporter (SvnReporter) – The Reporter.

  • recursively (bool) – Whether to revert child objects as well.

Update(objectIds, revision, depth=SvnDepth.Infinity, bOmitExternals=False, reporter=None, bThrowOnPredictedTreeConflict=False)

Updates objects in a specified project.

Parameters:
  • objectIds (list[SvnObjectId]) – The object ids to update. To guarantee consistency, you should pass this selection through SvnProjectServices.VerifySelection before calling.

  • revision (SvnRevision) – The revision to update them.

  • reporter (SvnReporter) – The Reporter.

  • depth (SvnDepth) – The depth.

  • bOmitExternals (bool) – If set to True, externals are omitted.

  • bThrowOnPredictedTreeConflict (bool) – If set to True, we try to predict and avoid tree conflict by throwing a SvnTreeConflictImminentException.

RevertProjectToRevision(nProjectHandle, bReleaseLocks, revision, reporter, bThrowOnPredictedTreeConflict=False)

Reverts the specified objects to a given revision.

Parameters:
  • nProjectHandle (int) – The handle of the project to revert.

  • revision (SvnRevision) – The revision to revert back to.

  • reporter (SvnReporter) – The Reporter.

  • bReleaseLocks (bool) – if set to True, the locks of the whole project are released. It is generally

a good idea to do this, so True is currently implied in the UI.

Parameters:

bThrowOnPredictedTreeConflict (bool) – If set to True, we try to predict and avoid tree conflict by throwing a SvnTreeConflictImminentException.

RevalidateRemoteLocks(objectIds, reporter)

Updates remote lock status of objects from the server without releasing invalidated locks in the working copy. The main use case is recognition of stolen locks.

Parameters:
  • objectIds (list[SvnObjectId]) – The objects the remote lock status should be updated for.

  • reporter (SvnReporter) – The reporter.

class ScriptSvnProjectServices.SvnProjectConfiguration

Bases: object

Project specific configurations.

property EffectiveConflictResolutionMode

Gets the effective conflict resolution mode. If the mode is not specifically configured for this project, the global setting is resolved.

Return type:

SvnConflictResolutionMode

property ProjectConflictResolutionMode

Gets or sets the project conflict specific resolution mode.

Return type:

SvnConflictResolutionMode

Returns:

The project resolution mode.

property ProjectConflictResolutionUseMarkers

Gets or sets the default whether conflict resolution allows conflict markers.

Return type:

SvnConflictUseMarkerMode

Returns:

The default_conflict_resolution_use_markers.

property EffectiveConflictResolutionUseMarkers

Gets or sets the default whether conflict resolution allows conflict markers.

Return type:

SvnConflictUseMarkerMode

Returns:

The effective project specific setting.

property EffectiveAutoLockingMode

Gets the effective auto locking mode. If the mode is not specifically configured for this project, the global setting is resolved.

Return type:

SvnAutoLockingMode

property ProjectAutoLockingMode

Gets or sets the project specific auto locking mode.

Return type:

SvnAutoLockingMode

Returns:

The project_auto_locking_mode.

property VersionInfoMode

Gets or sets the configuration for the SvnVersionInfoMode.

Return type:

SvnVersionInfoMode

Returns:

The SvnVersionInfoMode, or None if it was not explicitly

configured in this project yet.

property EffectiveVersionInfoMode

Gets or sets the effective SvnVersionInfoMode.

Return type:

SvnVersionInfoMode

Returns:

The effective SvnVersionInfoMode.

SaveThrough()

Writes the settings back to the object. This is sometimes necessary when modifying the settings via API.