/
lib64
/
python3.9
/
site-packages
/
mercurial
/
__pycache__
/
Upload File
HOME
a �+�b� � @ s� d dl mZ d dlZddlmZmZ ddlmZmZm Z ddd�Z dd � Zd d� ZG dd � d e �ZG dd� de �ZG dd� de �ZdS )� )�absolute_importN� )�encoding�pycompat)�dateutil�procutil� stringutilc s� � �fdd�}|dkr�z�� |�}W n ty6 Y nf0 |j|kr���|�}t�|d dd�D ]$}|d||d f d||f d� q^|||dko�|d d� �|d d d�S )z{Open log file in append mode, with optional rotation If maxsize > 0, the log file will be rotated up to maxfiles. c s� z�� |� W nJ tyX } z2|jtjkrD� �d|t�|j�f � W Y d }~n d }~0 0 z|rl��| |� W nL ty� } z4|jtjkr�� �d|| t�|j�f � W Y d }~n d }~0 0 d S )Ns warning: cannot remove '%s': %s s( warning: cannot rename '%s' to '%s': %s ) �unlink�OSError�errno�ENOENT�debugr Z strtolocal�strerror�rename)�oldpath�newpath�err��ui�vfs� �;/usr/lib64/python3.9/site-packages/mercurial/loggingutil.py�rotate s&