ScriptSvnCustomizationHooks¶
- class ScriptSvnCustomizationHooks.SvnLocationCustomizationHook¶
Bases:
object
This interface allows implementing plugins to customize the working copy location. All Implementations of this interface are loaded and queried on demand.
[Obsolete(“This hook is specific to the SVN plugin and may be phased out in a future version. You should implement the RCS neutral interface IRcsLocationCustomizationHook (in the RevisionControlSystemHooks) instead.”)]
- CustomizeLocationCreation(args)¶
This handler allows other plugins to modify the creation of svn locations for specific files.
- Parameters:
args (
SvnLocationCustomizationArgs
) – The hook arguments about the location to modify.
- class ScriptSvnCustomizationHooks.SvnSelectionVerificationHook¶
Bases:
object
This interface allows plugins to customize the set of nodes which can be selected for working-copy modifying operations like in the commit and revert dialoges.
[Obsolete(“This hook is specific to the SVN plugin and may be phased out in a future version. You should implement the RCS neutral interface IRcsSelectionVerificationHook (in the RevisionControlSystemHooks) instead.”)]
- VerifySelection(args)¶
Plugins can verify their internal consistency criteria, and modify the selection accordingly.
- class ScriptSvnCustomizationHooks.SvnObjectSerializationCustomizationHook¶
Bases:
object
This allows plugins to customize the serialization of objects into the subversion working copy.
[Obsolete(“This hook is specific to the SVN plugin and may be phased out in a future version. You should implement the RCS neutral interface IRcsObjectSerializationCustomizationHook (in the RevisionControlSystemHooks) instead.”)]
- InterceptObjectRead(nProjectHandle, objectGuid, objectTypeGuid, Name, embeddedTypeGuids, obj, isExternal)¶
Intercepts the read of an object from the working copy or remote server. The handler may modify or replace the object instance.
- Parameters:
nProjectHandle (int) – The destination project handle.
objectGuid (
Guid
) – The object GUID.objectTypeGuid (
Guid
) – The object type GUID.Name (str) – The name.
embeddedTypeGuids (list[Guid]) – The embedded type guids.
isExternal (bool) – If the object refers to a SVN external location
obj (object) – The object instance.
- InterceptPropertyRead(nProjectHandle, objectGuid, objectTypeGuid, Name, embeddedTypeGuids, properties, isExternal)¶
Intercepts the read of object properties from the working copy or remote server. The handler may modify or replace the properties.
- Parameters:
nProjectHandle (int) – The project handle.
objectGuid (
Guid
) – The object GUID.objectTypeGuid (
Guid
) – The object type GUID.Name (str) – The name.
embeddedTypeGuids (list[Guid]) – The embedded type guids.
properties (list[ObjectProperty]) – The properties, you can add, remove and modify properties here.
isExternal (bool) – If the object of the properties refers to a SVN external location
- InterceptPropertyReplacement(nProjectHandle, ObjectGuid, newObj, existingProperties, newProperties, isExternal)¶
Intercepts the property preservation on object replacement (e. G. SVN Update).
- Parameters:
nProjectHandle (int) – The project handle.
ObjectGuid (
Guid
) – The object GUID.newObj (object) – The new obj.
existingProperties (list[ObjectProperty]) – The existing properties (this list is read-only).
newProperties (list[ObjectProperty]) – The new properties (this list prepopulated from subversion, and is modifiable).
isExternal (bool) – If the object of the properties refers to a SVN external location
- InterceptWrite(nProjectHandle, objectGuid, objectTypeGuid, Name, embeddedTypeGuids, obj, properties, isExternal)¶
Intercepts the write of an object to the working copy. The handler may modify or replace the object instance and the object properties.
If you use
InterceptWrite
to filter out properties, you should consider to implementSvnDiffMergeCustomizationHook
to mark that property as local only.- Parameters:
nProjectHandle (int) – The project handle.
objectGuid (
Guid
) – The object GUID.objectTypeGuid (
Guid
) – The object type GUID.Name (str) – The name.
embeddedTypeGuids (list[Guid]) – The embedded type guids (this list is modifiable).
obj (object) – The object instance.
properties (list[ObjectProperty]) – The properties (see remarks below).
isExternal (bool) – If the object refers to a SVN external location
- class ScriptSvnCustomizationHooks.SvnDiffMergeCustomizationHook¶
Bases:
object
Customization for diffing and merging.
[Obsolete(“This hook is specific to the SVN plugin and may be phased out in a future version. You should implement the RCS neutral interface IRcsObjectSerializationCustomizationHook (in the RevisionControlSystemHooks) instead.”)]
- property LocalOnlyProperties¶
Declaration of local-only properties for branching and merging support.
- Return type:
list[Guid]
- Returns:
A sequence of property guids this hook considers to be local-only.
The contents of this property only influence merging processes, they do not magically omit this property during writing and reading, use the
SvnObjectSerializationCustomizationHook
interface for that functionality.
- class ScriptSvnCustomizationHooks.SvnLocationCustomizationArgs¶
Bases:
object
Instance of this class get passed to
SvnLocationCustomizationHook
.- property Node¶
Gets the IPSNode we need a SVN location for.
- Return type:
PSNode
- property DisplayName¶
Gets the user visible name we want to generate the location name for.
- Return type:
str
- Returns:
The desired user visible name.
- property NormalizedName¶
Gets the normalized name. Currently, the default is a sanitized version of the object name which will be used if there is no name collision in the file system.
- Return type:
str
- property CollisionFormatString¶
Gets the collision pattern. It is used when the location created by the normalized name is already used by some other node, or unusable for another reason. It has to be a String.Format compatible format string getting one integer object as argument which is counted up until a non-colliding working copy location is found. For pattern matching on location resurrection, the format string also has to allow a “*” to be passed.
- Return type:
str
- ModifyLocation(stNormalizedName, stCollisionFormatString)¶
Modifies the location creation patterns.
- Parameters:
stNormalizedName (str) – The normalized name.
stCollisionFormatString (str) – The collision format string.
Throws “ArgumentException” when any internal sanity test fails. Throws “FormatException” when the stCollisionFormatString fails during one of the internal sanity tests.
- class ScriptSvnCustomizationHooks.SvnSelectionVerificationArgs¶
Bases:
object
These args are used by the SvnUIServices, Svn Commands, and other Plugins to process selection extension or inversion.
For objects, this hook currently works on the granularity of
SvnItemType
.ObjectSynthesized and incoming Object IDs will be automatically extended to their synthesized counterparts. But this behaviour may change in the future, especially when the StatusControl learns to deal with unsynthesized IDs (similar to the working copy explorer).This interface is considered obsolete. Its support may be phased out in a future version of the SVN plugin. You should use the new, RCS neutral
RcsSelectionVerificationHook
in the RevisionControlSystemHooks interface dll instead.- property Action¶
Gets the action we want to verify the selection for.
- Return type:
SvnSelectionVerificationAction
- RequestSelection(obj, requiringObject, stReason)¶
Requests the selection of the specified object.For
SvnSelectionVerificationAction
.IncludeExternals,SvnSelectionVerificationArgsWithUrlAndRevision
.RequestSelection(ISvnObjectId, ISvnObjectId, string, Uri, ISvnRevision) has to be called instead.- Parameters:
obj (
SvnObjectId
) – The object which the hooks wants to add to the selection.requiringObject (
SvnObjectId
) – The requiring object. (OIW, the object which causes the addition.)stReason (str) – The human readable reason (will be displayed in case of a conflict).
Throws “InvalidOperationException” when
Action
is set toSvnSelectionVerificationAction
.IncludeExternals.
- RequestDeselection(obj, requiringObject, stReason)¶
Requests the deselection of the specified obj.
- Parameters:
obj (
SvnObjectId
) – The object which the hook wants to remove from the selection.requiringObject (
SvnObjectId
) – The requiring object. (OIW, the object which causes the removal.)stReason (str) – The human readable reason (will be displayed in case of a conflict).
- property UserWantsToSelect¶
Gets the list of objects the user wants to select, or the initial selection for Verification.
- Return type:
list[SvnObjectId]
- property UserWantsToDeSelect¶
Gets the list of objects the user wants to deselect. This is empty for verification of an initial selection.
- Return type:
list[SvnObjectId]
- property SelectedBeforeUserChange¶
Gets the objects which were selected before the user clicked. This is empty for verification of an initial selection.
- Return type:
list[SvnObjectId]
- property HooksWantToSelect¶
Gets the list of objects any previous hook wants to select.
- Return type:
list[SvnObjectId]
- property HooksWantToDeselect¶
Gets the list of objects any previous hook wants to deselect.
- Return type:
list[SvnObjectId]
- GetRequiringObjectForSelection(selection)¶
Gets the requiring object causing the selection request. In other words: For Objects selected by other hooks and returned by HooksWantToSelect(), you can query for the reason why the other hook requested the selection of that object.
- Parameters:
selection (
SvnObjectId
) – The object returned by HookWantsToSelect- Return type:
SvnObjectId
- Returns:
The object which caused a hook to select the
selection
object.
- GetRequiringObjectForDeSelection()¶
Gets the requiring object causing the deselection request. In other words: For Objects deselected by other hooks and returned by HooksWantToDeselect(), you can query for the reason why the other hook requested the deselection of that object.
- Parameters:
selection (
SvnObjectId
) – The object returned by HookWantsToDeselect- Return type:
SvnObjectId
- Returns:
The object which caused a hook to select the
selection
object.
- GetReasonForSelection(selection)¶
Gets the reason for the selection request. In other words: For Objects selected by other hooks and returned by HooksWantToSelect(), you can query for an explanation why the other hook requested the selection of that object.
- Parameters:
selection (
SvnObjectId
) – The selection.- Return type:
str
- GetReasonForDeSelection(selection)¶
Gets the reason for the deselection request. In other words: For Objects deselected by other hooks and returned by HooksWantToDeselect(), you can query for an explanation why the other hook requested the deselection of that object.
- Parameters:
selection (
SvnObjectId
) – The selection.- Return type:
str
- property ChangeCount¶
Gets the number of change requests made up to now.
- Return type:
int
- class ScriptSvnCustomizationHooks.SvnSelectionVerificationArgsWithUrlAndRevision¶
Bases:
object
Extension interface for
SvnSelectionVerificationArgs
since CoDeSys V3.5 SP1. This extension is used ifSvnSelectionVerificationArgs
.Action is set toSvnSelectionVerificationAction
.IncludeExternals to allow for the definition of URLs for the additionally selected :class:`SvnObjectId`s.- RequestSelection(requiringObject, stReason, url, revision)¶
Requests the selection of the specified object, including an Url. For
SvnSelectionVerificationAction
.IncludeExternals, this has to be called instead ofSvnSelectionVerificationArgs
.RequestSelection.- Parameters:
obj (
SvnObjectId
) – The object which the hooks wants to add to the selection.requiringObject (
SvnObjectId
) – The requiring object. (OIW, the object which causes the addition.)stReason (str) – The human readable reason (will be displayed in case of a conflict).
url (
Uri
) – The URL for the object.revision (
SvnRevision
) – The revision. You can pass null if you donot want to specify a specific revision.
- class ScriptSvnCustomizationHooks.SvnSelectionVerificationUrlAndRevisionData¶
Bases:
object
This extension is used if
SvnSelectionVerificationArgs
.Action is set toSvnSelectionVerificationAction
.IncludeExternals to allow for the definition of URLs for the additinally selected :class:`SvnObjectId`s.- GetUrlFor(id)¶
Gets the URL for an ISvnObjectId.
- Parameters:
id (
SvnObjectId
) – The id.- Return type:
Uri
- Returns:
The Url for this object. Throws “KeyNotFoundException” if no Url is known for this SvnObjectId.
- GetRevisionFor(id)¶
Gets the revision for an ISvnObjectId.
- Parameters:
id (
SvnObjectId
) – The id.- Return type:
SvnRevision
- Returns:
The revision for this object, or null if no specific revision was specified for this object. Throws “KeyNotFoundException” if no Url is known for this SvnObjectId.
- class ScriptSvnCustomizationHooks.SvnStatusControlFilterHook¶
Bases:
object
This hook allows Plugins to modify or hide the display of some objects in the status control. Be very careful when hiding objects, as the user has no way of editing those objects then.
[Obsolete(“This hook is specific to the SVN plugin and may be phased out in a future version. You should implement the RCS neutral interface IRcsStatusDisplayFilterHook (in the RevisionControlSystemHooks) instead.”)]
- CustomizeStatusDisplay(args)¶
Customize the display of a specific object in the status control. This hook method is called once when the object is encountered by the StatusControl the first time.
- Parameters:
args (
SvnStatusControlFilterArgs
) – The arguments for the hook.
- class ScriptSvnCustomizationHooks.SvnStatusControlFilterArgs¶
Bases:
object
The Arguments to customize the SVN status display.
- property Status¶
The SVN status info for the object.
- Return type:
SvnStatusInfo
- property ObjectInfo¶
The svn Object info for the object.
- Return type:
SvnObjectInfo
- property Action¶
The action for the dialog. (Currently, only Commit and Revert show a StatusControl dialog.)
- Return type:
SvnSelectionVerificationAction
- property Name¶
Gets or sets the name.
- Return type:
str
- property Hidden¶
Gets or sets a value indicating whether this
SvnStatusControlFilterArgs
is hidden.- Return type:
bool
- Returns:
True
if hidden; otherwise,False
.
- property Description¶
Gets or sets the description.
- Return type:
str
- Returns:
The description.