• Get Review Board
  • What's New
  • Products
  • Review Board Code review, image review, and document review
  • Documentation
  • Release Notes
  • Power Pack Enterprise integrations, reports, and enhanced document review
  • Try for 60 Days
  • Purchase
  • RBCommons Review Board as a Service, hosted by us
  • Pricing
  • RBTools Command line tools and Python API for Review Board
  • Documentation
  • Release Notes
  • Review Bot Automated code review, connecting tools you already use
  • Documentation
  • Release Notes
  • RB Gateway Manage Git and Mercurial repositories in your network
  • Documentation
  • Release Notes
  • Learn and Explore
  • What is Code Review?
  • Documentation
  • Frequently Asked Questions
  • Support Options
  • Third-Party Integrations
  • Demo
  • Review Board RBTools Power Pack Review Bot Djblets RB Gateway
    1. RBTools 6.x
    2. Version 6.x
    3. Version 5.x
    4. Version 4.x
    5. Version 3.x
    6. Version 2.0
    7. Version 1.0
    8. Version 0.7
    9. Version 0.6
    10. Version 0.5
    11. RBTools Python API
    12. Module and Class References
    13. rbtools.clients.svn
  • Home
  • Installing RBTools
  • Authenticating to Review Board
  • rbt Command
  • Configuration
  • Creating Custom Command Aliases
  • Repository Configuration
  • Per-User Configuration
  • Azure DevOps / Team Foundation Server Configuration
  • Commands
  • alias
  • api-get
  • attach
  • clear-cache
  • close
  • diff
  • info
  • install
  • land
  • list-repo-types
  • login
  • logout
  • patch
  • post
  • publish
  • review
  • setup-completion
  • setup-repo
  • stamp
  • status
  • status-update
  • RBTools Workflows
  • Using RBTools with Git
  • Using RBTools With Perforce
  • Using RBTools with Jujutsu
  • Using RBTools with HCL ClearCase and IBM ClearCase
  • Using RBTools With Keysight SOS
  • RBTools Python API
  • Overview of the Python API Client
  • Common Use Cases
  • Module and Class References
  • rbtools
  • rbtools.deprecation
  • rbtools.api
  • rbtools.api.cache
  • rbtools.api.capabilities
  • rbtools.api.client
  • rbtools.api.decode
  • rbtools.api.decorators
  • rbtools.api.errors
  • rbtools.api.factory
  • rbtools.api.request
  • rbtools.api.transport
  • rbtools.api.transport.sync
  • rbtools.api.utils
  • rbtools.api.resource
  • rbtools.api.resource.base
  • rbtools.api.resource.base_archived_object
  • rbtools.api.resource.base_comment
  • rbtools.api.resource.base_diff_commit
  • rbtools.api.resource.base_review_group
  • rbtools.api.resource.base_review_request
  • rbtools.api.resource.base_review
  • rbtools.api.resource.base_user
  • rbtools.api.resource.mixins
  • rbtools.api.resource.api_token
  • rbtools.api.resource.archived_review_request
  • rbtools.api.resource.change
  • rbtools.api.resource.default_reviewer
  • rbtools.api.resource.diff_comment
  • rbtools.api.resource.diff_commit
  • rbtools.api.resource.diff_context
  • rbtools.api.resource.diff_file_attachment
  • rbtools.api.resource.diff
  • rbtools.api.resource.draft_diff_commit
  • rbtools.api.resource.draft_file_attachment
  • rbtools.api.resource.draft_screenshot
  • rbtools.api.resource.extension
  • rbtools.api.resource.file_attachment_comment
  • rbtools.api.resource.file_attachment
  • rbtools.api.resource.file_diff
  • rbtools.api.resource.general_comment
  • rbtools.api.resource.hosting_service_account
  • rbtools.api.resource.hosting_service
  • rbtools.api.resource.last_update
  • rbtools.api.resource.muted_review_request
  • rbtools.api.resource.oauth_application
  • rbtools.api.resource.oauth_token
  • rbtools.api.resource.plain_text
  • rbtools.api.resource.remote_repository
  • rbtools.api.resource.repository_branch
  • rbtools.api.resource.repository_commit
  • rbtools.api.resource.repository_group
  • rbtools.api.resource.repository_info
  • rbtools.api.resource.repository_user
  • rbtools.api.resource.repository
  • rbtools.api.resource.review_group_user
  • rbtools.api.resource.review_group
  • rbtools.api.resource.review_reply
  • rbtools.api.resource.review_request_draft
  • rbtools.api.resource.review_request
  • rbtools.api.resource.review
  • rbtools.api.resource.root
  • rbtools.api.resource.screenshot_comment
  • rbtools.api.resource.screenshot
  • rbtools.api.resource.search
  • rbtools.api.resource.server_info
  • rbtools.api.resource.session
  • rbtools.api.resource.status_update
  • rbtools.api.resource.user_file_attachment
  • rbtools.api.resource.user
  • rbtools.api.resource.validate_diff_commit
  • rbtools.api.resource.validate_diff
  • rbtools.api.resource.validation
  • rbtools.api.resource.watched_review_group
  • rbtools.api.resource.watched_review_request
  • rbtools.api.resource.watched
  • rbtools.api.resource.webhook
  • rbtools.clients
  • rbtools.clients.base
  • rbtools.clients.base.patch
  • rbtools.clients.base.registry
  • rbtools.clients.base.repository
  • rbtools.clients.base.scmclient
  • rbtools.clients.errors
  • rbtools.clients.bazaar
  • rbtools.clients.clearcase
  • rbtools.clients.cvs
  • rbtools.clients.git
  • rbtools.clients.mercurial
  • rbtools.clients.perforce
  • rbtools.clients.plastic
  • rbtools.clients.sos
  • rbtools.clients.svn
  • rbtools.clients.tfs
  • rbtools.config
  • rbtools.config.config
  • rbtools.config.loader
  • rbtools.diffs
  • rbtools.diffs.patches
  • rbtools.diffs.patcher
  • rbtools.diffs.tools
  • rbtools.diffs.tools.backends
  • rbtools.diffs.tools.backends.gnu
  • rbtools.diffs.tools.base
  • rbtools.diffs.tools.base.diff_file_result
  • rbtools.diffs.tools.base.diff_tool
  • rbtools.diffs.tools.errors
  • rbtools.diffs.tools.registry
  • rbtools.diffs.writers
  • rbtools.commands
  • rbtools.commands.main
  • rbtools.commands.base
  • rbtools.commands.base.commands
  • rbtools.commands.base.errors
  • rbtools.commands.base.options
  • rbtools.commands.base.output
  • rbtools.commands.alias
  • rbtools.commands.api_get
  • rbtools.commands.attach
  • rbtools.commands.clearcache
  • rbtools.commands.close
  • rbtools.commands.diff
  • rbtools.commands.info
  • rbtools.commands.install
  • rbtools.commands.land
  • rbtools.commands.list_repo_types
  • rbtools.commands.login
  • rbtools.commands.logout
  • rbtools.commands.patch
  • rbtools.commands.post
  • rbtools.commands.publish
  • rbtools.commands.review
  • rbtools.commands.setup_completion
  • rbtools.commands.setup_repo
  • rbtools.commands.stamp
  • rbtools.commands.status
  • rbtools.commands.status_update
  • rbtools.hooks
  • rbtools.hooks.common
  • rbtools.hooks.git
  • rbtools.testing
  • rbtools.testing.api
  • rbtools.testing.api.payloads
  • rbtools.testing.api.transport
  • rbtools.testing.commands
  • rbtools.testing.testcase
  • rbtools.testing.transport
  • rbtools.utils
  • rbtools.utils.aliases
  • rbtools.utils.browser
  • rbtools.utils.checks
  • rbtools.utils.commands
  • rbtools.utils.console
  • rbtools.utils.diffs
  • rbtools.utils.encoding
  • rbtools.utils.errors
  • rbtools.utils.filesystem
  • rbtools.utils.graphs
  • rbtools.utils.mimetypes
  • rbtools.utils.process
  • rbtools.utils.repository
  • rbtools.utils.review_request
  • rbtools.utils.source_tree
  • rbtools.utils.users
  • Glossary
  • General Index
  • Python Module Index
  • Release Notes
  • rbtools.clients.svn¶

    A client for Subversion.

    Classes

    SVNClient(**kwargs)

    A client for Subversion.

    SVNPatcher(*, scmclient, **kwargs)

    A patcher that applies Subversion patches to a tree.

    SVNRepositoryInfo([path, base_path, uuid, ...])

    Information on a Subversion repository.

    class rbtools.clients.svn.SVNClient(**kwargs)[source]¶

    Bases: BaseSCMClient

    A client for Subversion.

    This is a wrapper around the svn executable that fetches repository information and generates compatible diffs.

    DIFF_COMPLETE_REMOVAL_RE = re.compile(b'^@@ -1,\\d+ \\+0,0 @@$')[source]¶
    DIFF_NEW_FILE_LINE_RE = re.compile(b'^\\+\\+\\+\\s+.*\\s+\\(.*\\)')[source]¶
    DIFF_ORIG_FILE_LINE_RE = re.compile(b'^---\\s+.*\\s+\\(.*\\)')[source]¶
    INDEX_FILE_RE = re.compile(b'^Index: (.+?)(?:\\t\\((added|deleted)\\))?\\n$')[source]¶
    INDEX_SEP = b'==================================================================='[source]¶
    PATCH_MIN_VERSION = (1, 7, 0)[source]¶
    REVISION_CHANGELIST_PREFIX = '--rbtools-changelist:'[source]¶
    REVISION_WORKING_COPY = '--rbtools-working-copy'[source]¶
    SHOW_COPIES_AS_ADDS_MIN_VERSION = (1, 7, 0)[source]¶
    VERSION_NUMBER_RE = re.compile('(\\d+)\\.(\\d+)\\.(\\d+)')[source]¶
    __firstlineno__ = 551¶
    __init__(**kwargs) → None[source]¶

    Initialize the client.

    Parameters:

    **kwargs (dict) – Keyword arguments to pass through to the superclass.

    __static_attributes__ = ('_svn_info_cache', '_svn_repository_info_cache', 'subversion_client_version')¶
    can_get_file_content: bool = True[source]¶

    Whether the tool can get files at specific revisions.

    Added in version 5.0.

    Type:

    bool

    check_dependencies() → None[source]¶

    Check whether all dependencies for the client are available.

    This checks for the presence of svn in the system path.

    Added in version 4.0.

    Raises:

    rbtools.clients.errors.SCMClientDependencyError – A git tool could not be found.

    check_options() → None[source]¶

    Verify the command line options.

    Raises:

    rbtools.clients.errors.OptionsCheckError – The supplied command line options were incorrect. In particular, if a file has history scheduled with the commit, the user needs to explicitly choose what behavior they want.

    convert_to_absolute_paths(diff_content: Iterator[bytes], repository_info: RepositoryInfo) → Iterator[bytes][source]¶

    Convert relative paths in a diff output to absolute paths.

    This handles paths that have been svn switched to other parts of the repository.

    Parameters:
    • diff_content (iterator of bytes) – The lines of the diff to process.

    • repository_info (SVNRepositoryInfo) – The repository info.

    Yields:

    bytes – Each processed line of the diff.

    diff(revisions: SCMClientRevisionSpec | None, *, include_files: Sequence[str] | None = None, exclude_patterns: Sequence[str] | None = None, **kwargs) → SCMClientDiffResult[source]¶

    Perform a diff in a Subversion repository.

    If the given revision spec is empty, this will do a diff of the modified files in the working directory. If the spec is a changelist, it will do a diff of the modified files in that changelist. If the spec is a single revision, it will show the changes in that revision. If the spec is two revisions, this will do a diff between the two revisions.

    SVN repositories do not support branches of branches in a way that makes parent diffs possible, so we never return a parent diff.

    Parameters:
    • revisions (dict) – A dictionary of revisions, as returned by parse_revision_spec().

    • include_files (list of str, optional) – A list of files to whitelist during the diff generation.

    • exclude_patterns (list of str, optional) – A list of shell-style glob patterns to blacklist during diff generation.

    • **kwargs (dict, unused) – Unused keyword arguments.

    Returns:

    A dictionary containing keys documented in rbtools.clients.base.scmclient.SCMClientDiffResult.

    Return type:

    dict

    find_copyfrom(path: str) → str | None[source]¶

    Find the source filename for copied files.

    The output of ‘svn info’ reports the “Copied From” header when invoked on the exact path that was copied. If the current file was copied as a part of a parent or any further ancestor directory, ‘svn info’ will not report the origin. Thus it is needed to ascend from the path until either a copied path is found or there are no more path components to try.

    Parameters:

    path (str) – The filename of the copied file.

    Returns:

    The filename of the source of the copy.

    Return type:

    str

    find_matching_server_repository(repositories: RepositoryListResource) → tuple[RepositoryItemResource | None, RepositoryInfoResource | None][source]¶

    Find a match for the repository on the server.

    Parameters:

    repositories (rbtools.api.resource.RepositoryListResource) – The fetched repositories.

    Returns:

    A 2-tuple of:

    Tuple:
    • 0 (rbtools.api.resource.RepositoryItemResource) – The matching repository resource, if found.

      If not found, this will be None.

    • 1 (rbtools.api.resource.RepositoryInfoResource) – The matching repository information resource, if found.

      If not found, this will be None.

    Return type:

    tuple

    get_file_content(*, filename: str, revision: str) → bytes[source]¶

    Return the contents of a file at a given revision.

    Added in version 5.0.

    Parameters:
    • filename (str) – The file to fetch.

    • revision (str) – The revision of the file to get.

    Returns:

    The read file.

    Return type:

    bytes

    Raises:

    rbtools.clients.errors.SCMError – The file could not be found.

    get_file_size(*, filename: str, revision: str) → int[source]¶

    Return the size of a file at a given revision.

    Added in version 5.0.

    Parameters:
    • filename (str) – The file to check.

    • revision (object) – The revision of the file to check.

    Returns:

    The size of the file, in bytes.

    Return type:

    int

    Raises:

    rbtools.client.errors.SCMError – An error occurred while attempting to get the file size.

    get_local_path() → str | None[source]¶

    Return the local path to the working tree.

    Returns:

    The filesystem path of the repository on the client system.

    Return type:

    str

    get_raw_commit_message(revisions: SCMClientRevisionSpec) → str[source]¶

    Return the raw commit message(s) for the given revisions.

    Parameters:

    revisions (dict) – Revisions to get the commit messages for. This will contain tip and base keys.

    Returns:

    The commit messages for all the requested revisions.

    Return type:

    str

    get_repository_info() → RepositoryInfo | None[source]¶

    Return repository information for the current working tree.

    Returns:

    The repository info structure.

    Return type:

    SVNRepositoryInfo

    handle_renames(diff_content: Iterator[bytes]) → Iterator[bytes][source]¶

    Fix up diff headers to properly show renames.

    The output of svn diff is incorrect when the file in question came into being via svn mv/cp. Although the patch for these files are relative to its parent, the diff header doesn’t reflect this. This function fixes the relevant section headers of the patch to portray this relationship.

    Parameters:

    diff_content (iterator of bytes) – The lines of the diff to process.

    Yields:

    bytes – Each processed line of the diff.

    history_scheduled_with_commit(repository_info: RepositoryInfo, changelist: str | None, include_files: Sequence[str], exclude_patterns: Sequence[str]) → bool[source]¶

    Return whether any files have history scheduled.

    Parameters:
    • changelist (str) – The changelist name, if specified.

    • include_files (list of str) – A list of files to whitelist during the diff generation.

    • exclude_patterns (list of str) – A list of shell-style glob patterns to blacklist during diff generation.

    Returns:

    True if any new files have been scheduled including their history.

    Return type:

    bool

    is_remote_only() → bool[source]¶

    Return whether this repository is operating in remote-only mode.

    For SVN, if a user provides the repository URL on the command line or config file, RBTools can proceed without a checkout.

    Returns:

    Whether this repository is operating in remote-only mode.

    Return type:

    bool

    name: str = 'Subversion'[source]¶

    The name of the client.

    Type:

    str

    parse_filename_header(diff_line: bytes) → tuple[str, bytes][source]¶

    Parse the filename header from a diff.

    Parameters:

    diff_line (bytes) – The line of the diff being parsed.

    Returns:

    The parsed header line. The filename will be decoded using the system filesystem encoding.

    Return type:

    tuple of (str, bytes)

    parse_revision_spec(revisions: Sequence[str] | None = None) → SCMClientRevisionSpec[source]¶

    Parse the given revision spec.

    These will be used to generate the diffs to upload to Review Board (or print). The diff for review will include the changes in (base, tip].

    If a single revision is passed in, this will return the parent of that revision for “base” and the passed-in revision for “tip”.

    If zero revisions are passed in, this will return the most recently checked-out revision for ‘base’ and a special string indicating the working copy for “tip”.

    The SVN SCMClient never fills in the ‘parent_base’ key. Users who are using other patch-stack tools who want to use parent diffs with SVN will have to generate their diffs by hand.

    Parameters:

    revisions (list of str, optional) – A list of revisions as specified by the user.

    Returns:

    The parsed revision spec.

    See SCMClientRevisionSpec for the format of this dictionary.

    This always populates base and tip.

    Return type:

    dict

    Raises:
    • rbtools.clients.errors.InvalidRevisionSpecError – The given revisions could not be parsed.

    • rbtools.clients.errors.TooManyRevisionsError – The specified revisions list contained too many revisions.

    patcher_cls[source]¶

    alias of SVNPatcher

    requires_diff_tool: bool | Sequence[str] = True[source]¶

    Whether this tool requires a command line diff tool.

    This may be a boolean or a list.

    If a boolean, then this must be False if no command line tool is required, or True if any command line tool supported by RBTools is available (in which case the SCMClient is responsible for ensuring compatibility).

    If a list, then this must be a list of registered diff tool IDs that are compatible.

    Added in version 4.0.

    Type:

    bool or list

    scan_for_server(repository_info: RepositoryInfo) → str | None[source]¶

    Scan for the reviewboard:url property in the repository.

    This method looks for the reviewboard:url property, which is an alternate (legacy) way of configuring the Review Board server URL inside a subversion repository.

    Parameters:

    repository_info (SVNRepositoryInfo) – The repository information structure.

    Returns:

    The Review Board server URL, if available.

    Return type:

    str

    scmclient_id: str = 'svn'[source]¶

    The unique ID of the client.

    Added in version 4.0: This will be required in RBTools 5.0.

    Type:

    str

    server_tool_ids: ClassVar[Sequence[str] | None] = ['subversion'][source]¶

    A comma-separated list of SCMClient IDs on the server.

    This supersedes server_tool_names when running on a version of Review Board that supports passing tool IDs to the repositories list API.

    Added in version 5.0.1.

    Type:

    str

    server_tool_names: ClassVar[str | None] = 'Subversion'[source]¶

    A comma-separated list of SCMClient names on the server.

    Added in version 3.0.

    Type:

    str

    subversion_client_version: tuple[int, int, int]¶
    supports_diff_exclude_patterns: bool = True[source]¶

    Whether the SCM client supports excluding files from the diff.

    Type:

    bool

    supports_empty_files() → bool[source]¶

    Check if the server supports added/deleted empty files.

    Returns:

    Whether the Review Board server supports empty added or deleted files.

    Return type:

    bool

    supports_patch_revert: bool = True[source]¶

    Whether the SCM client supports reverting patches.

    Type:

    bool

    svn_info(path, ignore_errors=False)[source]¶

    Return a dict which is the result of ‘svn info’ at a given path.

    Parameters:
    • path (str) – The path to the file being accessed.

    • ignore_errors (bool, optional) – Whether to ignore errors returned by svn info.

    Returns:

    The parsed svn info output.

    Return type:

    dict

    svn_log_xml(svn_args: Sequence[str], *args, **kwargs) → bytes | None[source]¶

    Run SVN log non-interactively and retrieve XML output.

    We cannot run SVN log interactively and retrieve XML output because the authentication prompts will be intermixed with the XML output and cause XML parsing to fail.

    This function returns None (as if none_on_ignored_error were True) if an error occurs that is not an authentication error.

    Parameters:
    • svn_args (list of str) – A list of additional arguments to add to the SVN command line.

    • *args (list) – Additional positional arguments to pass through to rbtools.utils.process.execute().

    • **kwargs (dict) – Additional keyword arguments to pass through to rbtools.utils.process.execute().

    Returns:

    The resulting log output.

    Return type:

    bytes

    Raises:

    rbtools.clients.errors.AuthenticationError – Authentication to the remote repository failed.

    class rbtools.clients.svn.SVNPatcher(*, scmclient: TSCMClient, **kwargs: Unpack[PatcherKwargs])[source]¶

    Bases: SCMClientPatcher[SVNClient]

    A patcher that applies Subversion patches to a tree.

    This applies patches using svn patch and to manually handle added and deleted empty files.

    The patcher supports tracking conflicts and partially-applied patches.

    Added in version 5.1.

    ADDED_FILES_RE = re.compile(b'^Index:\\s+(\\S+)\\t\\(added\\)$', re.MULTILINE)[source]¶
    DELETED_FILES_RE = re.compile(b'^Index:\\s+(\\S+)\\t\\(deleted\\)$', re.MULTILINE)[source]¶
    SVN_PATCH_STATUS_RE = re.compile(b'^(?P<status>[ACDGU]) {9}(?P<filename>.+)$')[source]¶
    __annotations_cache__ = {'_patched': 'bool', '_patching': 'bool', 'applied_patch_results': 'list[PatchResult]', 'can_commit': 'bool', 'can_patch_empty_files': 'bool', 'commit': 'bool', 'dest_path': 'Path', 'patches': 'Sequence[Patch]', 'repository_info': 'RepositoryInfo | None', 'revert': 'bool', 'run_commit_editor': 'bool', 'scmclient': 'TSCMClient', 'squash': 'bool'}¶
    __firstlineno__ = 59¶
    __static_attributes__ = ()¶
    apply_patch_for_empty_files(patch: Patch) → bool[source]¶

    Attempt to add or delete empty files in the patch.

    Parameters:

    patch (rbtools.diffs.patches.Patch) – The opened patch to check and possibly apply.

    Returns:

    True if there are empty files in the patch that were applied. False if there were no empty files or the files could not be applied (which will lead to an error).

    apply_single_patch(*, patch: Patch, patch_num: int) → PatchResult[source]¶

    Apply a single patch.

    This will take a single patch and apply it using Subversion.

    Parameters:
    • patch (rbtools.diffs.patches.Patch) – The patch to apply, opened for reading.

    • patch_num (int) – The 1-based index of this patch in the full list of patches.

    Returns:

    The result of the patch application, whether the patch applied successfully or with normal patch failures.

    Return type:

    rbtools.diffs.patches.PatchResult

    get_default_prefix_level(*, patch: Patch, base_dir: str | None = None) → int | None[source]¶

    Return the default path prefix strip level for a patch.

    This function determines how much of a path to strip by default, if an explicit value isn’t given.

    For Subversion, we always strip off any leading /.

    Changed in version 5.0.2:

    • Added the base_dir argument and changed to prefer that if present.

    Parameters:
    • patch (rbtools.diffs.patches.Patch) – The path to generate a default prefix strip level for.

    • base_dir (str, optional) –

      The base directory to use when computing the prefix level, if available.

      Added in version 5.0.2.

    Returns:

    The prefix strip level, or None if a clear one could not be determined.

    Return type:

    int

    handle_add_file(path: str, content: bytes) → None[source]¶

    Add a file.

    Added in version 6.0.

    Parameters:
    • path (str) – The path to the file.

    • content (bytes) – The content for the file.

    Raises:
    • OSError – A file operation failed.

    • Exception – Another error occurred when running svn.

    handle_move_file(old_path: str, new_path: str) → None[source]¶

    Move a file.

    Added in version 6.0.

    Parameters:
    • old_path (str) – The old filename.

    • new_path (str) – The new filename.

    Raises:
    • OSError – A file operation failed.

    • Exception – Another error occurred when running svn.

    handle_remove_file(path: str) → None[source]¶

    Delete a file.

    Added in version 6.0.

    Parameters:

    path (str) – The path to the file to delete.

    Raises:
    • OSError – A file operation failed.

    • Exception – Another error occurred when running svn.

    class rbtools.clients.svn.SVNRepositoryInfo(path: str | None = None, base_path: str | None = None, uuid: str | None = None, local_path: str | None = None, repository_id: int | None = None, tool: SVNClient | None = None)[source]¶

    Bases: RepositoryInfo

    Information on a Subversion repository.

    This stores information on the path and, optionally, UUID of a Subversion repository. It can match a local repository against those on a Review Board server.

    __firstlineno__ = 1871¶
    __init__(path: str | None = None, base_path: str | None = None, uuid: str | None = None, local_path: str | None = None, repository_id: int | None = None, tool: SVNClient | None = None) → None[source]¶

    Initialize the repository information.

    Parameters:
    • path (str) – Subversion checkout path.

    • base_path (str) – Root of the Subversion repository.

    • local_path (str) – The local filesystem path for the repository. This can sometimes be the same as path, but may not be (since that can contain a remote repository path).

    • uuid (str) – UUID of the Subversion repository.

    • repository_id (int, optional) – ID of the repository in the API. This is used primarily for testing purposes, and is not guaranteed to be set.

    • tool (rbtools.clients.base.scmclient.BaseSCMClient) – The SCM client.

    __static_attributes__ = ('base_path', 'path', 'repository_id', 'tool', 'uuid')¶
    repository_id: int | None¶

    ID of the repository in the API.

    This is used primarily for testing purposes, and is not guaranteed to be set.

    Type:

    int

    tool: SVNClient | None¶

    The SVN client that owns this repository information.

    Type:

    SVNClient

    update_from_remote(repository: RepositoryItemResource, info: RepositoryInfoResource) → None[source]¶

    Update the info from a remote repository.

    Parameters:
    • repository (rbtools.api.resource.RepositoryItemResource) – The repository resource.

    • info (rbtools.api.resource.RepositoryInfoResource) – The repository info resource.

    uuid: str | None¶

    UUID of the Subversion repository.

    Type:

    str

    Keep up with the latest Review Board releases, security updates, and helpful information.

    About
    News
    Demo
    RBCommons Hosting
    Integrations
    Happy Users
    Support Options
    Documentation
    FAQ
    User Manual
    RBTools
    Administration Guide
    Power Pack
    Release Notes
    Downloads
    Review Board
    RBTools
    Djblets
    Power Pack
    Package Store
    PGP Signatures
    Contributing
    Bug Tracker
    Submit Patches
    Development Setup
    Wiki
    Follow Us
    Mailing Lists
    Reddit
    Twitter
    Mastodon
    Facebook
    YouTube

    Copyright © 2006-2026 Beanbag, Inc. All rights reserved.

    Terms of Service — Privacy Policy — AI Ethics Policy — Branding

    On this page

    • [Top]
    • SVNClient
      • SVNClient.DIFF_COMPLETE_REMOVAL_RE
      • SVNClient.DIFF_NEW_FILE_LINE_RE
      • SVNClient.DIFF_ORIG_FILE_LINE_RE
      • SVNClient.INDEX_FILE_RE
      • SVNClient.INDEX_SEP
      • SVNClient.PATCH_MIN_VERSION
      • SVNClient.REVISION_CHANGELIST_PREFIX
      • SVNClient.REVISION_WORKING_COPY
      • SVNClient.SHOW_COPIES_AS_ADDS_MIN_VERSION
      • SVNClient.VERSION_NUMBER_RE
      • SVNClient.__firstlineno__
      • SVNClient.__init__()
      • SVNClient.__static_attributes__
      • SVNClient.can_get_file_content
      • SVNClient.check_dependencies()
      • SVNClient.check_options()
      • SVNClient.convert_to_absolute_paths()
      • SVNClient.diff()
      • SVNClient.find_copyfrom()
      • SVNClient.find_matching_server_repository()
      • SVNClient.get_file_content()
      • SVNClient.get_file_size()
      • SVNClient.get_local_path()
      • SVNClient.get_raw_commit_message()
      • SVNClient.get_repository_info()
      • SVNClient.handle_renames()
      • SVNClient.history_scheduled_with_commit()
      • SVNClient.is_remote_only()
      • SVNClient.name
      • SVNClient.parse_filename_header()
      • SVNClient.parse_revision_spec()
      • SVNClient.patcher_cls
      • SVNClient.requires_diff_tool
      • SVNClient.scan_for_server()
      • SVNClient.scmclient_id
      • SVNClient.server_tool_ids
      • SVNClient.server_tool_names
      • SVNClient.subversion_client_version
      • SVNClient.supports_diff_exclude_patterns
      • SVNClient.supports_empty_files()
      • SVNClient.supports_patch_revert
      • SVNClient.svn_info()
      • SVNClient.svn_log_xml()
    • SVNPatcher
      • SVNPatcher.ADDED_FILES_RE
      • SVNPatcher.DELETED_FILES_RE
      • SVNPatcher.SVN_PATCH_STATUS_RE
      • SVNPatcher.__annotations_cache__
      • SVNPatcher.__firstlineno__
      • SVNPatcher.__static_attributes__
      • SVNPatcher.apply_patch_for_empty_files()
      • SVNPatcher.apply_single_patch()
      • SVNPatcher.get_default_prefix_level()
      • SVNPatcher.handle_add_file()
      • SVNPatcher.handle_move_file()
      • SVNPatcher.handle_remove_file()
    • SVNRepositoryInfo
      • SVNRepositoryInfo.__firstlineno__
      • SVNRepositoryInfo.__init__()
      • SVNRepositoryInfo.__static_attributes__
      • SVNRepositoryInfo.repository_id
      • SVNRepositoryInfo.tool
      • SVNRepositoryInfo.update_from_remote()
      • SVNRepositoryInfo.uuid