Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/mercurial/__pycache__/ |
Upload File : |
o �]Lb� � @ 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�}|dkrNz�� |�}W n ty Y n3w |j|krN��|�}t�|d dd�D ]}|d||d f d||f d� q/|||dkoK|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 n% ty, } z|jtjkr"� �d|t�|j�f � W Y d }~nd }~ww z|r9��| |� W d S W d S tyi } z"|jtjkr^� �d|| t�|j�f � W Y d }~d S W Y d }~d S d }~ww )Ns warning: cannot remove '%s': %s s( warning: cannot rename '%s' to '%s': %s ) �unlink�OSError�errno�ENOENT�debugr � strtolocal�strerror�rename)�oldpath�newpath�err��ui�vfs� �7/usr/lib/python3/dist-packages/mercurial/loggingutil.py�rotate s2 ����������zopenlogfile.<locals>.rotater r ���s %s.%d)r r s .1� aF)�makeparentdirs)�statr �st_size�joinr �xrange) r r �name�maxfiles�maxsizer �st�path�ir r r �openlogfile s � �r'