class
ScriptSvnExtension.
SvnExtension
Bases: ScriptObject, ScriptProject
All ScriptObject and ScriptProject instances are extended with this interface, to provide access to the subversion functionality.
property
svn
Gets the svn extension for this object. This extension will be ProvidesIsVersioned or one of the appropriate sub-interfaces or this instance.
class
ScriptSvnExtension.
ProvidesIsVersioned
Bases: object
All objects and projects have this common base functionality.
property
is_versioned
Gets a value indicating whether this ScriptObject or ScriptProject is versioned.
bool
True if it is versioned; otherwise, False.
class
ScriptSvnExtension.
UnversionedProject
Bases: ProvidesIsVersioned
Unversioned projects implement this interface.
zzD5E9D59F8FF840E4AE6603385A6CB0B7import
url: Uri
message: str
Imports the project into subversion at the specified URL.
url (Uri) – The URL.
message (str) – The commit message.
import_project
Imports the project into subversion at the specified URL. Workaround for the fact that “import” is a reserved keyword in python.
url (Uri) – The URL.
message (str) – The commit message.
version_info_mode (SvnVersionInfoMode) – The version info mode.
class
ScriptSvnExtension.
VersionedProject
Bases: ProvidesIsVersioned
Versioned projects implement this interface.
commit
message: str
objects
keep_locks: bool = False
keep_changelists: bool = False
Commits the project (or the specified objects in the project).
message (str) – The message.
objects (list[object]) – The objects to commit. You can pass instances of DeletedScriptObject, ScriptObject`s and the :class:`ScriptProject itsself. This parameter is optional. If it is omitted, all modifications in the project are committed.
keep_locks (bool) – if set to True, locks are kept. This parameter is optional, the default is false.
keep_changelists (bool) – if set to True, the changelists are kept. This parameter is optional, the default is false.
disconnect
Disconnects this project from subversion, converting it into an unversioned project.
include_external
url: Uri
revision: DateTime
Includes the specified URI as external object.
url (Uri) – The URI of the external object to include.
revision (DateTime) – The revision.
mark_as_resolved
Marks the project as resolved (e. G. if there were tree conflicts).
revert
recursive: bool = False
Reverts the project top level.
recursive (bool) – if set to True, the revert is recursive to all child objects. This parameter is optional, the default is False. Non-recursive reverts can be used to revert top-level property changes.
switch
url: Uri
revision: DateTime
switches the project to the specified new location.
url (Uri) – The destination repository URL.
revision (DateTime) – The revision.
get_deleted_children
recursive: bool = False
Gets the deleted children of the project, or an empty python list if none.
recursive (bool) – if set to True, deleted sub children are included recursively. This parameter is optional, default is false.
list[object]
A python list of deleted children.
get_children
recursive: bool = False
Gets all children of the project, or an empty python list if none. This includes deleted children.
recursive (bool) – if set to True, sub children are included recursively. This parameter is optional, default is false.
list[object]
A python list of deleted children.
find
name: str
recursive: bool = False
Finds objects matching the given name (including deleted objects).
name (str) – The name.
recursive (bool) – Whether we search recursively (This parameter is optional, default = False).
list[object]
The collection of objects.
revalidate_locks
Revalidates the locks in this project.
merge
Merges the specified URL. Due to some constraints, merging is currently only supported for the primary project.
url (str) – The URL specifying the merge source.
flags (SvnMergeFlags) – The flags for the merge.
revision_ranges (object) – The revison_ranges.
property
effective_conflict_resolution_mode
Gets the effective conflict resolution mode. If the mode is not specifically configured for this project, the global setting is resolved.
SvnConflictResolutionMode
property
project_conflict_resolution_mode
Gets or sets the project conflict specific resolution mode.
SvnConflictResolutionMode
The project resolution mode.
property
effective_auto_locking_mode
Gets the effective auto locking mode. If the mode is not specifically configured for this project, the global setting is resolved.
SvnAutoLockingMode
property
project_auto_locking_mode
Gets or sets the project specific auto locking mode.
SvnAutoLockingMode
The project_auto_locking_mode.
property
project_conflict_resolution_use_markers
Gets or sets the default whether conflict resolution allows conflict markers.
SvnConflictUseMarkerMode
The default_conflict_resolution_use_markers. Reading it always returns true or false, setting it to null restores to the Default setting of the current implementation.
property
effective_conflict_resolution_use_markers
Gets or sets the default whether conflict resolution allows conflict markers.
The effective project specific setting.
SvnConlictUseMarkerMode
lock
objects
message: str = 'script lock'
steal_lock: bool = False
Locks the specified objects on the subversion server.
objects (list[object]) – The objects. If you pass null or an empty collection here, the whole project is locked.
message (str) – The message.
steal_lock (bool) – if set to True, the lock is stolen (IOW, existing locks are broken).
unlock
objects
Releases the svn lock for the given objects. Does nothing if the object is not locked.
objects (list[object]) – The objects. If you pass null or an empty collection here, the whole project is unlocked.
revert_project_to_revision
revision: DateTime
overwrite_local_changes: bool = False
Reverts the contents of the project to the given revision.
revision (DateTime) – The revision.
overwrite_local_changes (bool) – If set to True, local changes are silently overwritten. Throws “InvalidOperationException” when local changes exist, but overwrite_local_changes is set to False.
copy
newLocation: str
commit_message: str
source_revision: DateTime
switch_to_new_location: bool = False
Creates a copy (branch or tag) of the project at the specified new location.
newLocation (str) – The new location.
commit_message (str) – The commit message.
source_revision (DateTime) – The source revision.
switch_to_new_location (bool) – if set to True, switches to the new location after branching.
property
info
Get the SVN info of this VersionedProject from the working copy.
get_version_summary
Get the version summary of the svn working copy (similar to svnversion.exe).
Version summary
check_objects_preventing_safe_merge
Checks whether the working copy is in a “safe” state for merging.
str
A string explaining why the project cannot be merged, or null if there is no obstacle.
update
objects
recursive: bool = True
omit_externals: bool = False
prevent_treeconflicts: bool = False
Updates the specified objects to HEAD
objects (list[object]) – The objects. You can pass ScriptObjects and the ScriptProject itsself. This parameter is optional, if omitted, the Project root itsself is updated.
recursive (bool) – if set to True, the update recursively includes all child objects. This parameter is optional, the default is true.
omit_externals (bool) – if set to True, externals are omitted during the update operation. This parameter is optional, the default is false.
prevent_treeconflicts (bool) – if set to True, we try to predict and avoid tree conflict by throwing a SvnTreeConflictImminentException.
update_to
revision: DateTime
objects=None
recursive: bool = True
omit_externals: bool = False
prevent_treeconflicts: bool = False
Updates the specified objects to a specified revision.
revision (DateTime) – The revision.
objects (list[object]) – The objects. You can pass ScriptObjects and the ScriptProject itsself. This parameter is optional, if omitted, the Project root itsself is updated.
recursive (bool) – if set to True, the update recursively includes all child objects. This parameter is optional, the default is true.
omit_externals (bool) – if set to True, externals are omitted during the update operation. This parameter is optional, the default is false.
prevent_treeconflicts (bool) – if set to True, we try to predict and avoid tree conflict by throwing a SvnTreeConflictImminentException.
class
ScriptSvnExtension.
ObjectInVersionedProject
Bases: ProvidesIsVersioned
Objects in versioned projects have this extension.
property
is_deleted
Gets a value indicating whether this ObjectInVersionedProject is deleted.
bool
True if deleted; otherwise, False.
property
is_added
Gets a value indicating whether this ObjectInVersionedProject is added.
bool
class
ScriptSvnExtension.
UnversionedObjectInVersionedProject
Bases: ObjectInVersionedProject
Unversioned objects in versioned projects implement this interface.
add
Adds the specific object to version control.
class
ScriptSvnExtension.
VersionedObject
Bases: ObjectInVersionedProject
Common functionality for existing and deleted versioned objects.
property
ignore_on_commit
Gets or sets a value indicating whether this VersionedObject is ignored on commit.
bool
True if is_ignored_on_commit; otherwise, False.
property
is_locked
Gets a value indicating whether this VersionedObject is locked.
bool
True if locked; otherwise, False.
property
has_modifications
Gets a value indicating whether this VersionedObject has any local changes against the base revision, including deletion, addition, property changes and conflicts.
bool
True if changed; otherwise, False.
property
has_deleted_children
Gets a value indicating whether this VersionedObject has deleted children.
bool
True if has deleted children; otherwise, False.
property
is_external
Gets a value indicating whether this VersionedObject is external.
bool
True if external; otherwise, False.
revert
recursive: bool = False
Reverts the given object.
recursive (bool) – if set to True, the revert is recursive to all child objects. This parameter is optional, the default is false.
get_deleted_children
recursive: bool = False
Gets the deleted children of the project, or an empty python list if none.
recursive (bool) – if set to True, deleted sub children are included recursively. This parameter is optional, default is false.
list[object]
A python list of deleted children.
get_children
recursive: bool = False
Gets the children of the project, including deleted children, or an empty python list if none.
recursive (bool) – if set to True, deleted sub children are included recursively. This parameter is optional, default is false.
list[object]
A python list of deleted children.
commit
message: str
recursive: bool = True
keep_locks: bool = False
keep_changelists: bool = False
Commits the specified object.
message (str) – The cinnnut message.
recursive (bool) – if set to True, all sub objects are committed recursively. This parameter is optional, the default is true.
keep_locks (bool) – if set to True, locks are kept. This parameter is optional, the default is false.
keep_changelists (bool) – if set to True, the changelists are kept. This parameter is optional, the default is false.
find
name: str
recursive: bool = False
Finds objects matching the given name (including deleted objects).
name (str) – The name.
recursive (bool) – Whether we search recursively (This parameter is optional, default = False).
list[object]
The collection of objects.
lock
message: str = 'script lock'
steal_lock: bool = False
recursive: bool = False
Locks the specified object on the subversion server.
message (str) – The message.
steal_lock (bool) – if set to True, the lock is stolen (IOW, existing locks are broken).
recursive (bool) – if set to True, subnodes are recursively locked.
unlock
recursive: bool = False
Releases the svn locks for this instance.
recursive (bool) – if set to True, subnodes are recursively unlocked.
property
copied_to
Gets the objects this object was locally copied to, or an empty tuple if nothing was copied.
list[object]
The copied to.
property
info
Get the SVN info of this VersionedObject from the working copy.
property
has_conflict
Gets a value indicating whether this VersionedObject has any conflict.
bool
revert_to_revision
revision: DateTime
recursive: bool
Reverts the given object.
revision (DateTime) – the revision to revert to, provided as timestamp
recursive (bool) – if set to True, the revert is recursive to all child objects.
class
ScriptSvnExtension.
ExistingVersionedObject
Bases: VersionedObject
Versioned objects (which can only exist in versioned projects) provide the functionality specified in this interface.
resolve_conflict
resolution: SvnResolution
Resolves a conflict on the given object.
mark_as_resolved
Marks the conflicts of the object as resolved.
include_external
url: Uri
revision: DateTime
Includes the specified URI as external object.
url (Uri) – The URI of the external object to include.
revision (DateTime) – The revision.
update
recursive: bool = True
omit_externals: bool = False
Updates the object to HEAD revision.
recursive (bool) – if set to True, the update recursively includes all child objects.
omit_externals (bool) – if set to True, externals are omitted during the update operation.
update_to
revision: DateTime
recursive: bool = True
omit_externals: bool = False
Updates the object to a specified revision.
revision (DateTime) – The revision.
recursive (bool) – if set to True, the update recursively includes all child objects.
omit_externals (bool) – if set to True, externals are omitted during the update operation.
property
copied_from
Gets the object this was copied from, or None if this object was not locally copied.
object
The copy source object (which may be deleted by now).
property
moved_from
Gets the object this was moved from, or None if this object was not locally copied.
object
The copy source object (which is marked as deleted).
class
ScriptSvnExtension.
DeletedScriptObject
Bases: object
Instances of ExtendedObject`{:class:`DeletedVersionedScriptObject} represent deleted objects which are still present in the working copy, and are returned by get_deleted_children and get_children.
property
svn
Gets the svn extension for this object. This extension will be ObjectInVersionedProject or one of the appropriate sub-interfaces or this instance.
property
is_root
Gets a value indicating whether this DeletedScriptObject is root.
bool
False, as the project root cannot be a deleted object.
property
type
Gets the type guid.
Guid
property
guid
Gets the GUID of the object.
Guid
property
embedded_object_types
Gets the embedded object types.
list[Guid]
get_name
resolve_localized_display_name: bool = False
Gets the name of the object.
resolve_localized_display_name (bool) – This parameter is ignored (and is only for compatibility with IScriptObject instances). This parameter is optional, default = False)
str
The name of the object.
property
index
Gets the index. Is only for compatibility with IScriptObject instances, and always returns -1.
int
property
is_folder
Gets a value indicating whether this instance is a folder.
bool
True if this instance is a folder; otherwise, False.
property
parent
Gets the parent ScriptObject or DeletedSvnObject, or the Project if we are top-level.
object
property
project
Gets the project.
property
handle
Gets the internal Automation Platform handle of the Project.
int
find
name: str
recursive: bool = False
Finds objects matching the given name. As this is a deleted object, all child objects are also deleted ones.
name (str) – The name.
recursive (bool) – Whether we search recursively (This parameter is optional, default = False).
list[object]
The collection of objects.
get_children
recursive: bool = False
Gets the children of our object. As this is a deleted object, all child objects are also deleted ones.
recursive (bool) – If set to True, we work recursive (This parameter is optional, default = False).
list[object]
All child objects.
class
ScriptSvnExtension.
DeletedVersionedObject
Bases: VersionedObject
Deleted versioned objects have this interface on their .svn property. It currently only provides what IVersionedObject provides.
property
moved_to
Gets the object this was moved to, or None if this object was deleted and not moved.
object
The copy source object (which is marked as deleted).
class
ScriptSvnExtension.
SvnVersionSummary
Bases: object
The version summary of a svn working copy (similar to svnversion.exe).
property
min_version
Gets the min version.
long
property
max_version
Gets the max version.
long
property
is_incomplete_working_copy
Gets a value indicating whether [incomplete working copy].
bool
True if [incomplete working copy]; otherwise, False.
property
is_modified
Gets a value indicating whether this SvnWorkingCopyVersionSummary is modified.
bool
True if modified; otherwise, False.
property
is_switched
Gets a value indicating whether this SvnWorkingCopyVersionSummary is switched.
bool
True if switched; otherwise, False.
property
is_clean_version
Gets a value indicating whetherthe version is clean (MINREVISION == MAXREVISION, not incomplete, not modified, not switched)
bool
True if [clean version]; otherwise, False.
property
version_summary
Gets the version summary.
str
property
last_change_utc
Gets the time of the last change in UTC.
DateTime
The time of the last change in UTC.
property
last_change_author
Gets author of the last change.
str
The author of the last change.
class
ScriptSvnExtension.
SvnInfo
Bases: object
SVN info of a versioned object or project.
property
url
Gets the URL.
Uri
property
revision
Gets the queried revision.
long
property
repository_root
Gets the repository root.
Uri
property
repository_id
Gets the repository id, or Guid.Empty if not available.
Guid
property
last_change_revision
Gets the revision in which the subtree of the node had its last change.
long
property
last_change_time
Gets the last change time.
DateTime
property
last_change_author
Gets the last change author.
str
property
schedule
Gets the schedule.
SvnSchedule
property
content_time
Gets the content time.
DateTime
property
checksum
Gets the SHA1 checksum.
str