/usr/lib/python2.7/dist-packages/subvertpy/ra.py is in python-subvertpy 0.9.3-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | # Copyright (C) 2006-2008 Jelmer Vernooij <jelmer@jelmer.uk>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
"""Python bindings for Subversion."""
__author__ = "Jelmer Vernooij <jelmer@jelmer.uk>"
from subvertpy import SubversionException, ERR_BAD_URL
from subvertpy import _ra
from subvertpy._ra import *
from subvertpy import ra_svn
import urllib
url_handlers = {
"svn": _ra.RemoteAccess,
# "svn": ra_svn.Client,
"svn+ssh": _ra.RemoteAccess,
# "svn+ssh": ra_svn.Client,
"http": _ra.RemoteAccess,
"https": _ra.RemoteAccess,
"file": _ra.RemoteAccess,
}
def RemoteAccess(url, *args, **kwargs):
"""Connect to a remote Subversion server
:param url: URL to connect to
:return: RemoteAccess object
"""
(type, opaque) = urllib.splittype(url)
if not type in url_handlers:
raise SubversionException("Unknown URL type '%s'" % type, ERR_BAD_URL)
return url_handlers[type](url, *args, **kwargs)
|