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�`M � @ s� d dl Z d dlmZ d dlT d dlmZmZ d dlmZ d dl m Z d dlmZm Z d dlmZ d d lmZmZ d d lmZ d dlmZ G dd � d e�ZG dd� de�Zdd� Zdd� Zdd� Zddd�ZG dd� de�ZdS )� N)� ConfigSection)�*)� NoSuchNode�RepositoryManager)�IPropertyRenderer)�IPropertyDiffRenderer)�Ranges� to_ranges)�tag)�_�tag_)�chrome_resource_path)�_path_within_scopec @ s^ e Zd Zee� eddddid�Zdd� Zdd � Zd d� Z dd � Z dd� Zdd� Zdd� Z dS )�SubversionPropertyRenderer� svn:externalsa The TracBrowser for Subversion can interpret the `svn:externals` property of folders. By default, it only turns the URLs into links as Trac can't browse remote repositories. However, if you have another Trac instance (or an other repository browser like [http://www.viewvc.org/ ViewVC]) configured to browse the target repository, then you can instruct Trac which other repository browser to use for which external URL. This mapping is done in the `[svn:externals]` section of the TracIni. Example: {{{ [svn:externals] 1 = svn://server/repos1 http://trac/proj1/browser/$path?rev=$rev 2 = svn://server/repos2 http://trac/proj2/browser/$path?rev=$rev 3 = http://theirserver.org/svn/eng-soft http://ourserver/viewvc/svn/$path/?pathrev=25914 4 = svn://anotherserver.com/tools_repository http://ourserver/tracs/tools/browser/$path?rev=$rev }}} With the above, the `svn://anotherserver.com/tools_repository/tags/1.1/tools` external will be mapped to `http://ourserver/tracs/tools/browser/tags/1.1/tools?rev=` (and `rev` will be set to the appropriate revision number if the external additionally specifies a revision, see the [%(svnbook)s SVN Book on externals] for more details). Note that the number used as a key in the above section is purely used as a place holder, as the URLs themselves can't be used as a key due to various limitations in the configuration file parser. Finally, the relative URLs introduced in [http://subversion.apache.org/docs/release-notes/1.5.html#externals Subversion 1.5] are not yet supported. �svnbookz>http://svnbook.red-bean.com/en/1.7/svn.advanced.externals.html)�doc_argsc C s i | _ d S �N)�_externals_map)�self� r �E/usr/lib/python3/dist-packages/tracopt/versioncontrol/svn/svn_prop.py�__init__I s z#SubversionPropertyRenderer.__init__c C s |dv rdS |dv rdS dS )N)r �svn:needs-lock� �� svn:mergeinfo�svnmerge-blocked�svnmerge-integrated� r r �r �name�moder r r �match_propertyN s �z)SubversionPropertyRenderer.match_propertyc C sN |dkr| � || �S |dkr| �|�S |dks|�d�r%| �||||�S d S )Nr r r � svnmerge-)�_render_externals�_render_needslock� startswith�_render_mergeinfo)r r! r"