6rh9 Z d Z ddlmZ ddlZddlZddlZddlmZ ddlm Z ddl mZ ddl mZmZmZmZmZ ddlmZmZ erddlmZ d Zej Zej Z G d de Zded ef ded ef fdZded ef ded ef fdZded ef ded ef fdZdS )z!Module containing index utilities )wrapsN) TracebackType)is_win)AnyCallable TYPE_CHECKINGOptionalType)PathLike_T) IndexFile)TemporaryFileSwappost_clear_cache default_indexgit_working_dirc v e Zd ZdZdZdeddfdZddZdee e d ee d ee defdZ dS ) r zUtility class moving a file to a temporary location within the same directory and moving it back on to where on object deletion.) file_path tmp_file_pathr returnNc || _ t | j t j ddd z | _ t j | j | j d S # t $ r Y d S w xY w)N )r strtempfilemktempr osrenameOSError)selfr s `/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/git/index/util.py__init__zTemporaryFileSwap.__init__* sr " 008?2r23N3NN Idnd&899999 DD s A A('A(c | S N )r s r __enter__zTemporaryFileSwap.__enter__3 s exc_typeexc_valexc_tbc t j | j rXt r2t j | j rt j | j t j | j | j dS )NF) ospisfiler r existsr r remover )r r&