Server : Apache System : Linux cs317.bluehost.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : andertr9 ( 1047) PHP Version : 8.2.18 Disable Function : NONE Directory : /lib64/python2.7/site-packages/mercurial/ |
Upload File : |
� Hq�Qc @ s d Z d d l Z d d l m Z m Z m Z m Z m Z d d l m Z d d l Z d d l Z e d � Z \ Z Z Z e d Z d d d g Z d d � Z d e f d � � YZ d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d S( s� Mercurial phases support code --- Copyright 2011 Pierre-Yves David <pierre-yves.david@ens-lyon.org> Logilab SA <contact@logilab.fr> Augie Fackler <durin42@gmail.com> This software may be used and distributed according to the terms of the GNU General Public License version 2 or any later version. --- This module implements most phase logic in mercurial. Basic Concept ============= A 'changeset phase' is an indicator that tells us how a changeset is manipulated and communicated. The details of each phase is described below, here we describe the properties they have in common. Like bookmarks, phases are not stored in history and thus are not permanent and leave no audit trail. First, no changeset can be in two phases at once. Phases are ordered, so they can be considered from lowest to highest. The default, lowest phase is 'public' - this is the normal phase of existing changesets. A child changeset can not be in a lower phase than its parents. These phases share a hierarchy of traits: immutable shared public: X X draft: X secret: Local commits are draft by default. Phase Movement and Exchange =========================== Phase data is exchanged by pushkey on pull and push. Some servers have a publish option set, we call such a server a "publishing server". Pushing a draft changeset to a publishing server changes the phase to public. A small list of fact/rules define the exchange of phase: * old client never changes server states * pull never changes server states * publish and old server changesets are seen as public by client * any secret changeset seen in another repository is lowered to at least draft Here is the final table summing up the 49 possible use cases of phase exchange: server old publish non-publish N X N D P N D P old client pull N - X/X - X/D X/P - X/D X/P X - X/X - X/D X/P - X/D X/P push X X/X X/X X/P X/P X/P X/D X/D X/P new client pull N - P/X - P/D P/P - D/D P/P D - P/X - P/D P/P - D/D P/P P - P/X - P/D P/P - P/D P/P push D P/X P/X P/P P/P P/P D/D D/D P/P P P/X P/X P/P P/P P/P P/P P/P P/P Legend: A/B = final state on client / state on server * N = new/not present, * P = public, * D = draft, * X = not tracked (i.e., the old client or server has no internal way of recording the phase.) passive = only pushes A cell here can be read like this: "When a new client pushes a draft changeset (D) to a publishing server where it's not present (N), it's marked public on both sides (P/P)." Note: old client behave as a publishing server with draft only content - other people see it as public - content is pushed as draft i����N( t nullidt nullrevt bint hext short( t _i i t publict draftt secretc C s� | j � } t } g t D] } t � ^ q } ye | j d � } zD x= | D]5 } | j � \ } } | t | � j t | � � qJ WWd | j � XWnZ t k r� } | j t j k r� � n | r� x | D] } | | | � } q� Wn t } n X| | f S( s� Read phase roots from disk phasedefaults is a list of fn(repo, roots) callable, which are executed if the phase roots file does not exist. When phases are being initialized on an existing repository, this could be used to set selected changesets phase to something else than public. Return (roots, dirty) where dirty is true if roots differ from what is being stored. t phaserootsN( t unfilteredt Falset allphasest sett sopenert splitt intt addR t closet IOErrort errnot ENOENTt True( t repot phasedefaultst dirtyt it rootst ft linet phaset nht inst( ( s6 /usr/lib64/python2.7/site-packages/mercurial/phases.pyt _readrootsp s$ % t phasecachec B sh e Z e d � Z d � Z d � Z e d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( c C sJ | rF t | | � \ | _ | _ d | _ | j | � | j | _ n d S( N( R! R R t Nonet _phaserevst filterunknownR t opener( t selfR R t _load( ( s6 /usr/lib64/python2.7/site-packages/mercurial/phases.pyt __init__� s c C sJ t d d d t �} | j | _ | j | _ | j | _ | j | _ | S( NR( ( R"