hgext/convert/transport.py
author Matt Harbison <matt_harbison@yahoo.com>
Mon, 21 Dec 2020 20:21:46 -0500
changeset 52289 323e3626929a
parent 51863 f4733654f144
permissions -rw-r--r--
sslutil: add support for clients to set TLSv1.3 as the minimum protocol AFAICT, all of the TLS versions are supported by the server without doing any explicit work, and there's only a `devel` config to specify an exact version on the server side. Clients would also use TLSv1.3 if available, but this prevents the server from negotiating down. This also causes "tls1.3" to be listed in `hg debuginstall`, even though it was previously supported (if the Python intepreter supported it- IDK if there's a good way to proactively test for and show future protocols without requiring manual updates like this). The v1.3 tests are nested inside the v1.2 tests for simplicity. The v1.2 blocks already assume v1.0 and v1.1 support, so this seems reasonable for now. If/when the older protocols start getting dropped, this will have to be reworked anyway.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
     1
# -*- coding: utf-8 -*-
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
     2
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
     3
# Copyright (C) 2007 Daniel Holth <dholth@fastmail.fm>
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
     4
# This is a stripped-down version of the original bzr-svn transport.py,
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
     5
# Copyright (C) 2006 Jelmer Vernooij <jelmer@samba.org>
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
     6
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
     7
# This program is free software; you can redistribute it and/or modify
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
     8
# it under the terms of the GNU General Public License as published by
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
     9
# the Free Software Foundation; either version 2 of the License, or
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    10
# (at your option) any later version.
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    11
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    12
# This program is distributed in the hope that it will be useful,
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    15
# GNU General Public License for more details.
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    16
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License
15782
7de7630053cb Remove FSF mailing address from GPL headers
Martin Geisler <mg@aragost.com>
parents: 15599
diff changeset
    18
# along with this program; if not, see <http://www.gnu.org/licenses/>.
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    19
51863
f4733654f144 typing: add `from __future__ import annotations` to most files
Matt Harbison <matt_harbison@yahoo.com>
parents: 50929
diff changeset
    20
from __future__ import annotations
f4733654f144 typing: add `from __future__ import annotations` to most files
Matt Harbison <matt_harbison@yahoo.com>
parents: 50929
diff changeset
    21
49849
de9ffb82ef4d typing: suppress a bunch of potential import-error cases in extensions
Matt Harbison <matt_harbison@yahoo.com>
parents: 48946
diff changeset
    22
# pytype: disable=import-error
4938
4db03fa58bd5 convert/subversion: get converter working against plain HTTP.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4764
diff changeset
    23
import svn.client
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    24
import svn.core
28412
1e03b74195d4 convert: transport use absolute_import
timeless <timeless@mozdev.org>
parents: 25660
diff changeset
    25
import svn.ra
1e03b74195d4 convert: transport use absolute_import
timeless <timeless@mozdev.org>
parents: 25660
diff changeset
    26
49849
de9ffb82ef4d typing: suppress a bunch of potential import-error cases in extensions
Matt Harbison <matt_harbison@yahoo.com>
parents: 48946
diff changeset
    27
# pytype: enable=import-error
de9ffb82ef4d typing: suppress a bunch of potential import-error cases in extensions
Matt Harbison <matt_harbison@yahoo.com>
parents: 48946
diff changeset
    28
28412
1e03b74195d4 convert: transport use absolute_import
timeless <timeless@mozdev.org>
parents: 25660
diff changeset
    29
Pool = svn.core.Pool
1e03b74195d4 convert: transport use absolute_import
timeless <timeless@mozdev.org>
parents: 25660
diff changeset
    30
SubversionException = svn.core.SubversionException
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    31
4957
cdd33a048289 removed trailing whitespace
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4938
diff changeset
    32
# Some older versions of the Python bindings need to be
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    33
# explicitly initialized. But what we want to do probably
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    34
# won't work worth a darn against those libraries anyway!
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    35
svn.ra.initialize()
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    36
29668
09a5699cc3cb convert: move svn config initializer out of the module level
Durham Goode <durham@fb.com>
parents: 28461
diff changeset
    37
svn_config = None
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    38
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
    39
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    40
def _create_auth_baton(pool):
47062
f38bf44e077f black: make codebase compatible with black v21.4b2 and v20.8b1
Kyle Lippincott <spectral@google.com>
parents: 43089
diff changeset
    41
    """Create a Subversion authentication baton."""
49849
de9ffb82ef4d typing: suppress a bunch of potential import-error cases in extensions
Matt Harbison <matt_harbison@yahoo.com>
parents: 48946
diff changeset
    42
    import svn.client  # pytype: disable=import-error
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
    43
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    44
    # Give the client context baton a suite of authentication
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    45
    # providers.h
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    46
    providers = [
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    47
        svn.client.get_simple_provider(pool),
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    48
        svn.client.get_username_provider(pool),
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    49
        svn.client.get_ssl_client_cert_file_provider(pool),
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    50
        svn.client.get_ssl_client_cert_pw_file_provider(pool),
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    51
        svn.client.get_ssl_server_trust_file_provider(pool),
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
    52
    ]
17481
b555be7ca830 spelling: dependent
timeless@mozdev.org
parents: 15782
diff changeset
    53
    # Platform-dependent authentication methods
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
    54
    getprovider = getattr(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
    55
        svn.core, 'svn_auth_get_platform_specific_provider', None
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
    56
    )
8120
2b36ed5c1911 convert/svn: support more OS specific auth providers via svn 1.6 API
Patrick Mezard <pmezard@gmail.com>
parents: 6215
diff changeset
    57
    if getprovider:
2b36ed5c1911 convert/svn: support more OS specific auth providers via svn 1.6 API
Patrick Mezard <pmezard@gmail.com>
parents: 6215
diff changeset
    58
        # Available in svn >= 1.6
43077
687b865b95ad formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents: 43076
diff changeset
    59
        for name in (b'gnome_keyring', b'keychain', b'kwallet', b'windows'):
687b865b95ad formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents: 43076
diff changeset
    60
            for type in (b'simple', b'ssl_client_cert_pw', b'ssl_server_trust'):
8120
2b36ed5c1911 convert/svn: support more OS specific auth providers via svn 1.6 API
Patrick Mezard <pmezard@gmail.com>
parents: 6215
diff changeset
    61
                p = getprovider(name, type, pool)
2b36ed5c1911 convert/svn: support more OS specific auth providers via svn 1.6 API
Patrick Mezard <pmezard@gmail.com>
parents: 6215
diff changeset
    62
                if p:
2b36ed5c1911 convert/svn: support more OS specific auth providers via svn 1.6 API
Patrick Mezard <pmezard@gmail.com>
parents: 6215
diff changeset
    63
                    providers.append(p)
2b36ed5c1911 convert/svn: support more OS specific auth providers via svn 1.6 API
Patrick Mezard <pmezard@gmail.com>
parents: 6215
diff changeset
    64
    else:
50928
d718eddf01d9 safehasattr: drop usage in favor of hasattr
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50903
diff changeset
    65
        if hasattr(svn.client, 'get_windows_simple_provider'):
8120
2b36ed5c1911 convert/svn: support more OS specific auth providers via svn 1.6 API
Patrick Mezard <pmezard@gmail.com>
parents: 6215
diff changeset
    66
            providers.append(svn.client.get_windows_simple_provider(pool))
5126
117dab48ca99 convert: support windows SVN simple auth provider
Patrick Mezard <pmezard@gmail.com>
parents: 4957
diff changeset
    67
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    68
    return svn.core.svn_auth_open(providers, pool)
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    69
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
    70
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    71
class NotBranchError(SubversionException):
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    72
    pass
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    73
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
    74
48946
642e31cb55f0 py3: use class X: instead of class X(object):
Gregory Szorc <gregory.szorc@gmail.com>
parents: 48875
diff changeset
    75
class SvnRaTransport:
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    76
    """
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    77
    Open an ra connection to a Subversion repository.
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    78
    """
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
    79
43077
687b865b95ad formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents: 43076
diff changeset
    80
    def __init__(self, url=b"", ra=None):
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    81
        self.pool = Pool()
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    82
        self.svn_url = url
43077
687b865b95ad formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents: 43076
diff changeset
    83
        self.username = b''
687b865b95ad formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents: 43076
diff changeset
    84
        self.password = b''
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    85
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    86
        # Only Subversion 1.4 has reparent()
50928
d718eddf01d9 safehasattr: drop usage in favor of hasattr
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50903
diff changeset
    87
        if ra is None or not hasattr(svn.ra, 'reparent'):
4938
4db03fa58bd5 convert/subversion: get converter working against plain HTTP.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4764
diff changeset
    88
            self.client = svn.client.create_context(self.pool)
4db03fa58bd5 convert/subversion: get converter working against plain HTTP.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4764
diff changeset
    89
            ab = _create_auth_baton(self.pool)
4db03fa58bd5 convert/subversion: get converter working against plain HTTP.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4764
diff changeset
    90
            self.client.auth_baton = ab
29668
09a5699cc3cb convert: move svn config initializer out of the module level
Durham Goode <durham@fb.com>
parents: 28461
diff changeset
    91
            global svn_config
09a5699cc3cb convert: move svn config initializer out of the module level
Durham Goode <durham@fb.com>
parents: 28461
diff changeset
    92
            if svn_config is None:
09a5699cc3cb convert: move svn config initializer out of the module level
Durham Goode <durham@fb.com>
parents: 28461
diff changeset
    93
                svn_config = svn.core.svn_config_get_config(None)
4938
4db03fa58bd5 convert/subversion: get converter working against plain HTTP.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4764
diff changeset
    94
            self.client.config = svn_config
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
    95
            try:
4938
4db03fa58bd5 convert/subversion: get converter working against plain HTTP.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4764
diff changeset
    96
                self.ra = svn.client.open_ra_session(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
    97
                    self.svn_url, self.client, self.pool
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
    98
                )
25660
328739ea70c3 global: mass rewrite to use modern exception syntax
Gregory Szorc <gregory.szorc@gmail.com>
parents: 17481
diff changeset
    99
            except SubversionException as xxx_todo_changeme:
328739ea70c3 global: mass rewrite to use modern exception syntax
Gregory Szorc <gregory.szorc@gmail.com>
parents: 17481
diff changeset
   100
                (inst, num) = xxx_todo_changeme.args
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   101
                if num in (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   102
                    svn.core.SVN_ERR_RA_ILLEGAL_URL,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   103
                    svn.core.SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   104
                    svn.core.SVN_ERR_BAD_URL,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   105
                ):
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   106
                    raise NotBranchError(url)
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   107
                raise
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   108
        else:
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   109
            self.ra = ra
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   110
            svn.ra.reparent(self.ra, self.svn_url.encode('utf8'))
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   111
48946
642e31cb55f0 py3: use class X: instead of class X(object):
Gregory Szorc <gregory.szorc@gmail.com>
parents: 48875
diff changeset
   112
    class Reporter:
11498
8fa85378c527 convert: tuple parameter unpacking is deprecated in py3k
Renato Cunha <renatoc@gmail.com>
parents: 10282
diff changeset
   113
        def __init__(self, reporter_data):
8fa85378c527 convert: tuple parameter unpacking is deprecated in py3k
Renato Cunha <renatoc@gmail.com>
parents: 10282
diff changeset
   114
            self._reporter, self._baton = reporter_data
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   115
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   116
        def set_path(self, path, revnum, start_empty, lock_token, pool=None):
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   117
            svn.ra.reporter2_invoke_set_path(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   118
                self._reporter,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   119
                self._baton,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   120
                path,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   121
                revnum,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   122
                start_empty,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   123
                lock_token,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   124
                pool,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   125
            )
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   126
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   127
        def delete_path(self, path, pool=None):
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   128
            svn.ra.reporter2_invoke_delete_path(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   129
                self._reporter, self._baton, path, pool
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   130
            )
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   131
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   132
        def link_path(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   133
            self, path, url, revision, start_empty, lock_token, pool=None
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   134
        ):
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   135
            svn.ra.reporter2_invoke_link_path(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   136
                self._reporter,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   137
                self._baton,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   138
                path,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   139
                url,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   140
                revision,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   141
                start_empty,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   142
                lock_token,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   143
                pool,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   144
            )
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   145
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   146
        def finish_report(self, pool=None):
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   147
            svn.ra.reporter2_invoke_finish_report(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   148
                self._reporter, self._baton, pool
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   149
            )
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   150
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   151
        def abort_report(self, pool=None):
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   152
            svn.ra.reporter2_invoke_abort_report(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   153
                self._reporter, self._baton, pool
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   154
            )
4764
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   155
6a16ef0d1c7c convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff changeset
   156
    def do_update(self, revnum, path, *args, **kwargs):
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   157
        return self.Reporter(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   158
            svn.ra.do_update(self.ra, revnum, path, *args, **kwargs)
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 33368
diff changeset
   159
        )