File: //kunden/lib/python3/dist-packages/breezy/__pycache__/rules.cpython-39.pyc
a
�*�^a � @ s� d Z ddlmZ ddlZddlmZmZmZmZm Z dZ
dZee�Z
daG dd � d ej�ZG d
d� de�ZG dd
� d
e�ZG dd� de�Zdd� Zdd� Ze� dS )zrRule-based definition of preferences for selected files in selected branches
See ``bzr help rules`` for details.
� )�absolute_importN� )�bedding�cmdline�errors�globbing�osutilsz .bzrruleszname c @ s e Zd ZdZdd� ZdS )�UnknownRulesz)Unknown rules detected: %(unknowns_str)s.c C s t jj| d�|�d� d S )Nz, )Zunknowns_str)r �BzrError�__init__�join)�self�unknowns� r �./usr/lib/python3/dist-packages/breezy/rules.pyr 2 s zUnknownRules.__init__N)�__name__�
__module__�__qualname__Z_fmtr r r r r r . s r c @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �_RulesSearcherz/An object that provides rule-based preferences.c C s t | j��dS )z�Return the preferences for a path as name,value tuples.
:param path: tree relative path
:return: () if no rule matched, otherwise a sequence of name,value
tuples.
N)�NotImplementedError� get_items)r
�pathr r r r 9 s z_RulesSearcher.get_itemsc C s t | j��dS )a� Return selected preferences for a path as name,value tuples.
:param path: tree relative path
:param names: the list of preferences to lookup
:return: () if no rule matched, otherwise a sequence of name,value
tuples. The sequence is the same length as names,
tuple order matches the order in names, and
undefined preferences are given the value None.
N)r �get_selected_items)r
r �namesr r r r B s
z!_RulesSearcher.get_selected_itemsc C s"