Mercurial > hg > mercurial-crew-with-dirclash
annotate hgext/convert/transport.py @ 4831:13cb25bb7607
merge with crew-stable
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 06 Jul 2007 08:55:36 +0200 |
parents | 6a16ef0d1c7c |
children | 4db03fa58bd5 |
rev | line source |
---|---|
4757
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 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
18 # along with this program; if not, write to the Free Software |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
20 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
21 from cStringIO import StringIO |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
22 import os |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
23 from tempfile import mktemp |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
24 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
25 from svn.core import SubversionException, Pool |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
26 import svn.ra |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
27 import svn.core |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
28 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
29 # Some older versions of the Python bindings need to be |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
30 # 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
|
31 # 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
|
32 svn.ra.initialize() |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
33 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
34 svn_config = svn.core.svn_config_get_config(None) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
35 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
36 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
37 def _create_auth_baton(pool): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
38 """Create a Subversion authentication baton. """ |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
39 import svn.client |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
40 # 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
|
41 # providers.h |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
42 providers = [ |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
43 svn.client.get_simple_provider(pool), |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
44 svn.client.get_username_provider(pool), |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
45 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
|
46 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
|
47 svn.client.get_ssl_server_trust_file_provider(pool), |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
48 ] |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
49 return svn.core.svn_auth_open(providers, pool) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
50 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
51 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
52 # # The SVN libraries don't like trailing slashes... |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
53 # return url.rstrip('/') |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
54 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
55 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
56 class SvnRaCallbacks(svn.ra.callbacks2_t): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
57 """Remote access callbacks implementation for bzr-svn.""" |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
58 def __init__(self, pool): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
59 svn.ra.callbacks2_t.__init__(self) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
60 self.auth_baton = _create_auth_baton(pool) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
61 self.pool = pool |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
62 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
63 def open_tmp_file(self, pool): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
64 return mktemp(prefix='tailor-svn') |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
65 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
66 class NotBranchError(SubversionException): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
67 pass |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
68 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
69 class SvnRaTransport(object): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
70 """ |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
71 Open an ra connection to a Subversion repository. |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
72 """ |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
73 def __init__(self, url="", ra=None): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
74 self.pool = Pool() |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
75 self.svn_url = url |
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 # Only Subversion 1.4 has reparent() |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
78 if ra is None or not hasattr(svn.ra, 'reparent'): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
79 self.callbacks = SvnRaCallbacks(self.pool) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
80 try: |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
81 ver = svn.ra.version() |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
82 try: # Older SVN bindings |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
83 self.ra = svn.ra.open2(self.svn_url.encode('utf8'), self.callbacks, None, svn_config, None) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
84 except TypeError, e: |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
85 self.ra = svn.ra.open2(self.svn_url.encode('utf8'), self.callbacks, svn_config, None) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
86 except SubversionException, (_, num): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
87 if num == svn.core.SVN_ERR_RA_ILLEGAL_URL: |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
88 raise NotBranchError(url) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
89 if num == svn.core.SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED: |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
90 raise NotBranchError(url) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
91 if num == svn.core.SVN_ERR_BAD_URL: |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
92 raise NotBranchError(url) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
93 raise |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
94 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
95 else: |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
96 self.ra = ra |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
97 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
|
98 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
99 class Reporter: |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
100 def __init__(self, (reporter, report_baton)): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
101 self._reporter = reporter |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
102 self._baton = report_baton |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
103 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
104 def set_path(self, path, revnum, start_empty, lock_token, pool=None): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
105 svn.ra.reporter2_invoke_set_path(self._reporter, self._baton, |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
106 path, revnum, start_empty, lock_token, pool) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
107 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
108 def delete_path(self, path, pool=None): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
109 svn.ra.reporter2_invoke_delete_path(self._reporter, self._baton, |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
110 path, pool) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
111 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
112 def link_path(self, path, url, revision, start_empty, lock_token, |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
113 pool=None): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
114 svn.ra.reporter2_invoke_link_path(self._reporter, self._baton, |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
115 path, url, revision, start_empty, lock_token, |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
116 pool) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
117 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
118 def finish_report(self, pool=None): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
119 svn.ra.reporter2_invoke_finish_report(self._reporter, |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
120 self._baton, pool) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
121 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
122 def abort_report(self, pool=None): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
123 svn.ra.reporter2_invoke_abort_report(self._reporter, |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
124 self._baton, pool) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
125 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
126 def do_update(self, revnum, path, *args, **kwargs): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
127 return self.Reporter(svn.ra.do_update(self.ra, revnum, path, *args, **kwargs)) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
128 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
129 def clone(self, offset=None): |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
130 """See Transport.clone().""" |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
131 if offset is None: |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
132 return self.__class__(self.base) |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
133 |
6a16ef0d1c7c
convert extension: stripped-down svn transport module
Daniel Holth <dholth@fastmail.fm>
parents:
diff
changeset
|
134 return SvnRaTransport(urlutils.join(self.base, offset), ra=self.ra) |