Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/tracopt/versioncontrol/svn/__pycache__/ |
Upload File : |
o �k�`_� � @ s� d Z ddlZddlZddlZddlZddlmZ ddlm Z ddl mZmZ ddl T ddlmZmZmZmZmZmZmZ ddlmZ dd lmZ dd lmZ ddlmZmZmZ ddl m!Z! dd l"m#Z#m$Z$m%Z% ddl&m'Z' dd� Z(dd� Z)dd� Z*dd� Z+dd� Z,dd� Z-dd� Z.dd� Z/dd � Z0d3d!d"�Z1d#d$� Z2G d%d&� d&e�Z3G d'd(� d(e4�Z5G d)d*� d*e�Z6G d+d,� d,e�Z7G d-d.� d.e�Z8d/d0� Z9G d1d2� d2e:�Z;dS )4a� Note about Unicode ------------------ The Subversion bindings are not unicode-aware and they expect to receive UTF-8 encoded `string` parameters, On the other hand, all paths manipulated by Trac are `str` objects. Therefore: * before being handed out to SVN, the Trac paths have to be encoded to UTF-8, using `_to_svn()` * before being handed out to Trac, a SVN path has to be decoded from UTF-8, using `_from_svn()` Whenever a value has to be stored as utf8, we explicitly mark the variable name with "_utf8", in order to avoid any possible confusion. Warning: `SubversionNode.get_content()` returns an object from which one can read a stream of bytes. NO guarantees can be given about what that stream of bytes represents. It might be some text, encoded in some way or another. SVN properties *might* give some hints about the content, but they actually only reflect the beliefs of whomever set those properties... � N)�quote)�ISystemInfoProvider)� ListOption�ChoiceOption)�*)� Changeset�Node� Repository�IRepositoryConnector�InvalidRepository�NoSuchChangeset� NoSuchNode)�CachedRepository)�embedded_numbers)� threading)�exception_to_unicode� to_unicode�to_utf8)�_)�from_utimestamp�to_datetime�utc)�Hrefc C s0 ddl mamamama tjtjtjtj ia d S )Nr )�fs�repos�core�delta)�svnr r r r �svn_node_dirr � DIRECTORY� svn_node_file�FILE�_kindmap� r# r# �C/usr/lib/python3/dist-packages/tracopt/versioncontrol/svn/svn_fs.py�_import_svnF s �r% c G s t �d�|��d��d�| �S )z�Expect a pool and a list of `str` path components. Returns an UTF-8 encoded string suitable for the Subversion python bindings (the returned path never starts with a leading "/") �/�utf-8)r �svn_path_canonicalize�join�lstrip�encode)�pool�argsr# r# r$ �_to_svnL s �r. c C s t | t�r t| d�} | S )z�Expect an UTF-8 encoded string and transform it to a `str` object But Subversion repositories built from conversion utilities can have non-UTF-8 byte strings, so we have to convert using `to_unicode`. r'