File: //kunden/lib/python3/dist-packages/breezy/__pycache__/add.cpython-39.pyc
a
�*�^� � @ st d Z ddlmZ ddlZddlZddlmZmZmZ ddl m
Z
G dd� de�ZG d d
� d
e�Z
G dd� de�ZdS )
z3Helper functions for adding files to working trees.� )�absolute_importN� )�errors�osutils�ui)�gettextc @ s2 e Zd ZdZd dd�Zejfdd�Zd
dd�ZdS )� AddActionz=A class which defines what action to take when adding a file.Nc C s. || _ |du rtj| _ d| _|dur*|| _dS )a* Initialize an action which prints added files to an output stream.
:param to_file: The stream to write into. This is expected to take
Unicode paths. If not supplied, it will default to ``sys.stdout``.
:param should_print: If False, printing will be suppressed.
NF)�_to_file�sys�stdout�should_print)�self�to_filer � r �,/usr/lib/python3/dist-packages/breezy/add.py�__init__# s zAddAction.__init__c C s | j r| j�d||� � dS )z�Add path to inventory.
The default action does nothing.
:param inv: The inventory we are working with.
:param path: The FastPath being added
:param kind: The kind of the object being added.
z
adding %s
N)r r �write)r
�inv� parent_ie�path�kindZ_quoter r r �__call__1 s zAddAction.__call__c C s dS )a� Test whether the given file should be skipped or not.
The default action never skips. Note this is only called during
recursive adds
:param tree: The tree we are working in
:param path: The path being added
:param kind: The kind of object being added.
:param stat: Stat result for this file, if available already
:return bool. True if the file should be skipped (not added)
Fr )r
�treer r �
stat_valuer r r � skip_file>