File: //usr/lib/python3/dist-packages/trac/versioncontrol/web_ui/__pycache__/changeset.cpython-310.pyc
o
�k�`'� � @ s� d dl mZ d dlmZ d dlZd dlZd dlZd dlmZm Z m
Z
d dlT d dlm
Z
d dlmZ d dlmZ d d lmZmZmZ d d
lmZ d dlmZmZmZmZ d dlmZmZ d d
l m!Z! d dl"m#Z# d dl$m%Z%m&Z&m'Z'm(Z(m)Z) d dl*m+Z+m,Z,m-Z- d dl.m/Z/m0Z0m1Z1m2Z2 d dl3m4Z4m5Z5m6Z6 d dl7m8Z8 d dl9m:Z:m;Z; d dl<m=Z=m>Z> d dl?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZG d dlHmIZImJZJ d dlKmLZL G dd� deM�ZNG dd� deO�ZPG dd� deO�ZQG dd � d eO�ZRd!d"� ZSdS )#� )�partial)�groupbyN)�
BoolOption� IntOption�Option)�*)�Mimeview)�IPermissionRequestor)�ResourceNotFound)�
ISearchSource�
search_to_sql�shorten_result)�ITimelineEventProvider)�as_bool�content_disposition�embedded_numbers�pathjoin)�from_utimestamp�pretty_timedelta)�tag)�to_json)�CRLF�exception_to_unicode�shorten_line�
to_unicode�unicode_urlencode)�_�ngettext�tag_)� Changeset�NoSuchChangeset�Node�RepositoryManager)�diff_blocks�get_diff_options�unified_diff)�
BrowserModule)�content_closing�
render_zip)�IRequestHandler�RequestDone)�Chrome�INavigationContributor�add_ctxtnav�add_link�
add_script�add_stylesheet�prevnext_nav�web_context)�IWikiSyntaxProvider�
WikiParser)� format_toc @ s e Zd ZdZdd� Zdd� ZdS )�IPropertyDiffRendererz>Render node properties in TracBrowser and TracChangeset views.c C � dS )z�Indicate whether this renderer can treat the given property diffs
Returns a quality number, ranging from 0 (unsupported) to 9
(''perfect'' match).
N� ��namer8 r8 �F/usr/lib/python3/dist-packages/trac/versioncontrol/web_ui/changeset.py�match_property_diff: � z)IPropertyDiffRenderer.match_property_diffc C r7 )a� Render the given diff of property to HTML.
`name` is the property name as given to `match_property_diff()`,
`old_context` corresponds to the old node being render
(useful when the rendering depends on the node kind)
and `old_props` is the corresponding collection of all properties.
Same for `new_node` and `new_props`.
`options` are the current diffs options.
The rendered result can be one of the following:
- `None`: the property change will be shown the normal way
(''changed from `old` to `new`'')
- an `str` value: the change will be shown as textual content
- `Markup` or `Fragment`: the change will shown as block markup
Nr8 )r: �old_context� old_props�new_context� new_props�optionsr8 r8 r; �render_property_diffA r= z*IPropertyDiffRenderer.render_property_diffN)�__name__�
__module__�__qualname__�__doc__r<