HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //lib64/python2.7/site-packages/hgext/share.pyo
�
1�3\c	@@s`dZddlmZddlZddlmZddlmZmZm	Z	m
Z
mZmZm
Z
mZiZeje�ZdZeddd	ded
�fddded
�fddded�fged�dejde�deeed��Zedgddej�d��Zd�Zd�Zd�Zd�Zd�Zd�ZdS(sfshare a common history between several working directories

Automatic Pooled Storage for Clones
-----------------------------------

When this extension is active, :hg:`clone` can be configured to
automatically share/pool storage across multiple clones. This
mode effectively converts :hg:`clone` to :hg:`clone` + :hg:`share`.
The benefit of using this mode is the automatic management of
store paths and intelligent pooling of related repositories.

The following ``share.`` config options influence this feature:

``share.pool``
    Filesystem path where shared repository data will be stored. When
    defined, :hg:`clone` will automatically use shared repository
    storage instead of creating a store inside each clone.

``share.poolnaming``
    How directory names in ``share.pool`` are constructed.

    "identity" means the name is derived from the first changeset in the
    repository. In this mode, different remotes share storage if their
    root/initial changeset is identical. In this mode, the local shared
    repository is an aggregate of all encountered remote repositories.

    "remote" means the name is derived from the source repository's
    path or URL. In this mode, storage is only shared if the path or URL
    requested in the :hg:`clone` command matches exactly to a repository
    that was cloned before.

    The default naming mode is "identity".
i(tabsolute_importN(t_(t	bookmarkstcommandsterrort
extensionsthgt	registrarttxnutiltutilsships-with-hg-coretsharetUtnoupdates!do not create a working directorytBRsalso share bookmarksttrelatives4point to source using a relative path (EXPERIMENTAL)s[-U] [-B] SOURCE [DEST]thelpcategorytnorepocC@s-tj||d|d|d|d|�dS(s�create a new shared repository

    Initialize a new repository and working directory that shares its
    history (and optionally bookmarks) with another repository.

    .. note::

       using rollback or extensions that destroy/modify history (mq,
       rebase, etc.) can cause considerable confusion with shared
       clones. In particular, if two shared clones are both updated to
       the same changeset, and one of them destroys that changeset
       with rollback, the other clone will suddenly stop working: all
       operations will fail with "abort: working directory has unknown
       parent". The only known workaround is to use debugsetparents on
       the broken clone to reset it to a changeset that still exists.
    tdesttupdateRRi(RR
(tuitsourceRRRR((s1/usr/lib64/python2.7/site-packages/hgext/share.pyR
?s
tunsharecC@s8|j�s$tjtd���ntj||�dS(suconvert a shared repository to a normal one

    Copy the store data to the repo and remove the sharedpath data.
    sthis is not a shared repoN(tsharedRtAbortRRR(Rtrepo((s1/usr/lib64/python2.7/site-packages/hgext/share.pyR_scO@sa|jdd�}|r*tj|�}ni|d6|jdd�d6|d<|||||�S(NR
tpoolt
poolnamingtmodet	shareopts(tconfigR	t
expandpath(torigRRtargstoptsR((s1/usr/lib64/python2.7/site-packages/hgext/share.pytclonelscC@sYtjtdt�tjtjdt�tjtjdt�tjtj	dt
�dS(Nt
_getbkfilet
_recordchanget
_writerepoR#(RtwrapfunctionRt	getbkfiletbmstoretrecordchanget	writerepotwrapcommandRttableR#(R((s1/usr/lib64/python2.7/site-packages/hgext/share.pytextsetupxscC@sXy|jjd�j�}Wn,tk
rJ}|jtjkrF�ntSXtj|kS(s.Returns whether this repo has shared bookmarksR(	tvfstreadt
splitlinestIOErrorterrnotENOENTtFalseRtsharedbookmarks(RRtinst((s1/usr/lib64/python2.7/site-packages/hgext/share.pyt_hassharedbookmarks~scC@s�t|�r�tj|�}|dk	r�y9tj|j|jd�\}}|rU|S|j�Wn+t	k
r�}|j
t
jkr��q�nX|}q�n||�S(NR(R8RtsharedreposourcetNoneRt
trypendingtrootR/tcloseR2R3R4(R RtsrcrepotfptpendingR7((s1/usr/lib64/python2.7/site-packages/hgext/share.pyR(�s
c@sf|�|�t�j�rbtj�j���dk	rbd}|j|��fd��qbndS(Nsshare-bookmarksc@s
�j��S(N(R&(ttr(tselfR>(s1/usr/lib64/python2.7/site-packages/hgext/share.pyt<lambda>�R(R8t_repoRR9R:taddpostclose(R RBRAtcategory((RBR>s1/usr/lib64/python2.7/site-packages/hgext/share.pyR*�s
cC@sQ|||�t|j�rMtj|j�}|dk	rM|||�qMndS(N(R8RDRR9R:(R RBRR>((s1/usr/lib64/python2.7/site-packages/hgext/share.pyR+�s

(t__doc__t
__future__RR3tmercurial.i18nRt	mercurialRRRRRRRR	tcmdtabletcommandt
testedwithR:tCATEGORY_REPO_CREATIONtTrueR5R
tCATEGORY_MAINTENANCERR#R.R8R(R*R+(((s1/usr/lib64/python2.7/site-packages/hgext/share.pyt<module>&s.:		$