ScriptSvnIntegration

class ScriptSvnIntegration.SvnIntegration

Bases: object

The Interface for CoDeSys SVN. The Svn plugin provides a system instance with the type guid 508296B0-6AB7-41e1-AD87-72BE9AD44533 for this interface.

property CommonServices

Contains all services which work with local and remote SVN Objects, or are agnostic.

Return type:

SvnCommonServices

property EventServices

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

Return type:

SvnEventServices

property ProjectServices

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

Return type:

SvnProjectServices

property RemoteServices

Contains all functionality which works against a server.

Return type:

SvnRemoteServices

property UIServices

Contains several UI related services.

Return type:

SvnUIServices

Returns:

system instance with the type guid 21662EFC-3501-4e14-9FC3-F158E38351B2 for this interface.

property StatusCache

Gets the status cache.

Return type:

SvnStatusCache

CheckConsistency(reporter)

Internal consistency check and repair function. Use for debugging purposes and in case of emergency.

Parameters:

reporter (SvnCheckReporter) – The Reporter.

CreateRemoteSession(url, reporter)

Creates a remote session instance.

Parameters:
  • url (Uri) – The initial base url for the remote session.

  • reporter (SvnReporter) – The reporter.

Return type:

SvnRemoteSession

Returns:

The remote session.

ClearRemoteCaches(sender, args)

Request to clear the remote cache. This should be called whenever a plugin changes something on the server (without using the subversion Plugin), or the user issues an explicit request to clear those caches (e. G. the Reload button in the Repo browser).

Parameters:
  • sender (object) – The sender.

  • args (EventArgs) – The System.EventArgs instance containing the event data.

property AutoCheckConsistency

Gets or sets a value indicating whether SvnIntegration.CheckConsistency is implicitly called after most operations which potentially affect consistency. (This is a debugging / testing tool and not intended for everyday operation.)

Return type:

bool

Returns:

True if the consistency check is to be ran after most operations; otherwise False.

property DefaultConflictResolutionMode

Gets or sets the global default conflict resolution mode.

Return type:

SvnConflictResolutionMode

Returns:

The resolution mode.

property DefaultConflictResolutionUseMarkers

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

Return type:

SvnConflictUseMarkerMode

Returns:

The default_conflict_resolution_use_markers. Reading it always returns true or false, setting it to null restores the implementation defined default.

property DefaultAutoLockingMode

Gets or sets the global default auto locking mode.

Return type:

SvnAutoLockingMode

GetCachedRemoteSession(url)

Gets a cached remote session instance.

Parameters:

url (Uri) – The initial base url for the remote session.

Return type:

SvnRemoteSession

Returns:

The remote session.

IsConnectionlessRepository(url)

Determines whether the specified URL points to a connectionless repository.

Parameters:

url (:clas:`Uri`) – The URL.

Return type:

bool

Returns:

True if the url is connectionless; otherwise, False.

property AutoLockFailureQueryUser

Gets or sets the automatic lock failure query user setting. If this is set to true, the user will be queried what to do when automatic locking is failing due to outdated projects.

Returns:

bool

Returns:

The automatic lock failure query user or null

property AutoLockFailureReaction

Gets or sets last chosen option in the automatic lock failure dialog.

Return type:

SvnAutoLockFailureReaction

Returns:

The automatic lock failure reaction or null.

ForceCredentials(userName=None, password=None)

Forces a specific userName and password for all future operations, overriding the cache.

Parameters:
  • userName (str) – The user name to force, or null to disable forcing.

  • password (str) – The password to force, or null if only the user name should be forced.

property DefaultSvnVersionInfoMode

Gets or sets the default SVN version information mode - this controls the state of the appropriate controls in the import dialog if the project does not yet have an appropriate setting.

Return type:

SvnVersionInfoMode

Returns:

The default SVN version information mode.

see also: SvnProjectServices.ImportProject(int, Uri, string, SvnVersionInfoMode, ISvnReporter) SvnVersionInfoMode SvnProjectConfiguration.VersionInfoMode

class ScriptSvnIntegration.SvnIntegrationCommandHelper

Bases: object

This interface is reserved for the testmanager.

ToCommandParameterRepresentation(objectId)

Converts the SvnObjectID to the command parameter representation.

Parameters:

objectId (SvnObjectId) – The object ID to convert.

Return type:

str

Returns:

The command parameter representation.

RevisionFromCommandParameterRepresentation(stRepresentation)

Parses an SNV revision back from the string representation.

Parameters:

stRepresentation (str) – The string representation.

Return type:

SvnRevision

Returns:

The parsed revision.

exception ScriptSvnIntegration.SvnException

Bases: Exception

Wrapper for a subversion exception. This exception encapsulates subversion specific exceptions.

SvnException(stMessage)

Initializes a new instance of the SvnException class.

Parameters:

stMessage (str) – The message.

ErrorCode()

Gets the Subversion error code, or 0 if none is appropriate.

Return type:

int

Clone()

Clones this instance (shallow copy).

Return type:

SvnException

Returns:

The copied SVN exception.

exception ScriptSvnIntegration.SvnEntryNotFoundException

Bases: SvnException

Replacement of SharpSvn.SvnEntryNotFoundException only used in SvnRemoteSession.ListInternal

exception ScriptSvnIntegration.SvnExceptionWithPsNode

Bases: SvnException

Abstract base class for SVN Exceptions with a PS Node.

SvnExceptionWithPsNode(node, innerException=None)

Initializes a new instance of the SvnExceptionWithPsNode class.

Parameters:
  • stMessage (str) – The message.

  • node (PSNode) – The node.

  • innerException (Exception) – The inner exception (This is sometimes a SharpSVN internal exception type).

property Node

Gets the node which was affected by this problem.

Return type:

PSNode

Returns:

The node.

exception ScriptSvnIntegration.SvnLockFailedException

Bases: SvnExceptionWithPsNode

This exception is thrown when an svn lock fails during the auto locking mechanism.

SvnLockFailedException(node, innerException=None)

Initializes a new instance of the SvnLockFailedException class.

Parameters:
  • stMessage (str) – The message.

  • node (PSNode) – The node.

  • innerException (SvnException) – The inner exception (This is sometimes a SharpSVN internal exception type).

exception ScriptSvnIntegration.SvnStructuralModificationFailedException

Bases: SvnExceptionWithPsNode

This exception is thrown when a structural modification is forbidden due to SVN constraints.

SvnStructuralModificationFailedException(node, innerException=None)

Initializes a new instance of the SvnStructuralModificationFailedException class.

Parameters:
  • stMessage (str) – The message.

  • node (PSNode) – The node.

  • innerException (SvnException) – The inner exception (This is sometimes a SharpSVN internal exception type).

exception ScriptSvnIntegration.SvnTreeConflictImminentException

Bases: SvnException

This exception is throw, when a SVN operation is likely to result in a tree conflict situation.

SvnTreeConflictImminentException(stMessage, conflictCandidatePaths, innerException=None)
class ScriptSvnIntegration.SvnConflictHandler

Bases: object

Handlers for SVN Conflicts.

property Name

Gets the user visible name of the conflict handler.

Return type:

str

GetConflictSolvers(info, mode, callback, reporter)

Gets the conflict solvers.

Parameters:
  • info (SvnConflictsInfo) – The info.

  • mode (SvnConflictResolutionMode) – The mode. Only Solvers appropriate for the current mode should be passed.

  • callback (ProgressCallback) – The callback.

  • reporter (SvnReporter) – The reporter.

Return type:

SvnConflictSolver

GetAdditionalConflictSolvers(info, mode, callback, reporter)

Gets the additional conflict solvers. This method is called after some conflict solver has done its work. Only new conflict solvers which are triggered due to the new info should be returned.

Parameters:
  • info (SvnConflictResolverUpdateInfo) – The info.

  • mode (SvnConflictResolutionMode) – The mode. Only Solvers appropriate for the current mode should be passed.

  • callback (ProgressCallback) – The callback.

  • reporter (SvnReporter) – The reporter.

Return type:

SvnConflictSolver

class ScriptSvnIntegration.SvnConflictsInfo

Bases: object

Information about a conflict situation in the SVN working copy.

property FullWorkingCopyInfo

Gets the full list of working copy infos for the whole project.

Return type:

SvnInfo

property AllConflicts

Gets all conflicts.

Return type:

SvnInfo

property TreeConflicts

Gets the tree conflicts.

Return type:

SvnInfo

property SimpleConflicts

Gets the simple conflicts.

the SVN plugin is only interested in conflict handlers for a specific subset of the project.

Return type:

SvnInfo

property ProjectStructure

Gets the project structure.

Return type:

ProjectStructure

property Reporter

Gets the reporter which was passed to the operation which triggered the conflicts.

Return type:

SvnReporter

GetParentOf(info)

Gets the parent for some SVN Info.

Parameters:

info (SvnInfo) – The info.

Return type:

SvnInfo

Returns:

The parent for the given SVN info, or null if there is no info.

GetChildrenOf(info)

Gets the children for some SVN Info.

Parameters:

info (SvnInfo) – The info.

Return type:

SvnInfo

Returns:

A sequence of children, or an empty sequence if there are no children.

CreateScope(info, data)

Factory function for SvnConflictSolutionScopeItem.

Parameters:
  • info (SvnInfo) – The info.

  • data (SvnConflictData) – The data.

Return type:

SvnConflictSolutionScopeItem

CreateSolver(stName, stDescription, executor, type, obsoleteChecker, scope)

Factory function for SvnConflictSolver, if you don’t want to implement your own class for this.

Parameters:
  • stName (str) – Name of the conflict resolver.

  • stDescription (str) – The description of the conflict resolver.

  • executor (:class:` SvnConflictSolutionExecutor`) – The executor - the delegate which will resolve the conflict.

  • type (SvnConflictResolverType) – The type of the conflict resolver.

  • obsoleteChecker (SvnConflictResolverUpdateInfo) – The obsolete checker - this method checks whether this solver was obsoleded by the actions of a previous resolver.

  • scope (SvnConflictSolutionScopeItem) – The scope of this resolution.

Return type:

SvnConflictSolver

Returns:

A new solver instance.

class ScriptSvnIntegration.SvnConflictResolverUpdateInfo

Bases: SvnConflictsInfo

This info is passed when conflict resolutions are revalidated after some other resolver did (try) part of its work.

property VanishedConflicts

Those conflicts have vanished due to the actions of the other resolver.

Return type:

SvnInfo

property NewTreeConflicts

Those new tree conflicts exist due to the actions of the other resolver. (Those issues might have been other conflicts before.)

Return type:

SvnInfo

property NewSimpleConflicts

Those new simple conflicts exist due to the actions of the other resolver. (Those issues might have been other conflicts before.)

Return type:

SvnInfo

ScriptSvnIntegration.SvnConflictSolutionExecutor()

[Delegate]

class ScriptSvnIntegration.SvnConflictSolver

Bases: object

This is a possible solution for the tree conflict.

property Name

Gets the short name / title of the tree conflict solution.

Return type:

str

property Description

Gets the description of the tree conflict solution.

Return type:

str

property Scope

Gets the scope of the conflict resolution, which objects are covered by this solver.

Return type:

list[SvnConflictSolutionScopeItem]

property Type

Gets the type.

Return type:

SvnConflictResolverType

Execute()

Performs this solution of the tree conflict.

Return type:

SvnConflictSolutionResult

IsObsoletedBy(info)

Determines whether this conflict resolver was obsoleted by the work done by some other conflict resolver. This method is checked for all solutions where the Scope

Parameters:

info (SvnConflictResolverUpdateInfo) – The info.

Return type:

bool

Returns:

True if [is obsoleted by] [the specified info]; otherwise, False.

class ScriptSvnIntegration.SvnConflictSolutionScopeItem

Bases: object

One item in the scope of the conflict resolution item.

property Subject

The working copy location covered.

Return type:

SvnInfo

property Conflict

The actual conflicts covered by the scope item.

Return type:

SvnConflictData