File: //kunden/lib/python3/dist-packages/breezy/__pycache__/info.cpython-39.pyc
a
�*�^N � @ sH d dl mZ dgZd dlmZ d dlZd dlZddlmZ m
Z
mZmZ
mZmZ ddlmZ ddlmZmZmZmZ dd lmZ d3dd�ZG d
d� de�Zd4dd�Zdd� Zdd� Zdd� Zdd� Zd5dd�Z d6dd�Z!dd� Z"dd � Z#d!d"� Z$d#d$� Z%d%d&� Z&d'd(� Z'd7d*d�Z(d8d+d,�Z)d9d-d.�Z*d/d0� Z+G d1d2� d2e
j,�Z-e-� ZdS ):� )�absolute_import�show_bzrdir_info)�StringION� )�branch�
controldir�errors�hooks�osutils�urlutils)�bzrdir)�
NoWorkingTree�NotBranchError�NoRepositoryPresent�NotLocalUrl)�
find_unmerged� c C s | dkr|S |d ur|S dS d S )Nr �s� )�n�baseZplr r �-/usr/lib/python3/dist-packages/breezy/info.py�plural) s
r c @ s, e Zd Zdd� Zdd� Zdd� Zdd� Zd S )
�LocationListc C s g | _ || _d S �N)�locs� base_path)�selfr r r r �__init__4 s zLocationList.__init__c C sP |du rdS zt �|�}W n$ t jy> | j�||f� Y n0 | �||� dS )z:Add a URL to the list, converting it to a path if possibleN)r Zlocal_path_from_urlZ
InvalidURLr �append�add_path)r �labelZurl�pathr r r �add_url8 s zLocationList.add_urlc C sZ zt �| j|�}W n tjy& Y n0 |dkr4d}|dkrF|�d�}| j�||f� dS )z8Add a path, converting it to a relative path if possibler �.�/N)r
�relpathr r ZPathNotChild�rstripr r )r r! r"