File: //usr/lib/python2.7/dist-packages/mercurial/repoview.pyc
σ
ΫXc @@ s& d d l m Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z m
Z
m Z m Z
d Z d Z d Z d Z d Z d
Z d Z d Z d
Z d Z d Z d Z d Z i e d 6e d 6e d 6e d 6Z d Z d e f d YZ d S( i ( t absolute_importNi ( t nullrev( t errort obsoletet phasest tagsc C@ s t j | d S( sa Revision candidates to be hidden
This is a standalone function to allow extensions to wrap it.
Because we use the set of immutable changesets as a fallback subset in
branchmap (see mercurial.branchmap.subsettable), you cannot set "public"
changesets as "hideable". Doing so would break multiple code assertions and
lead to crashes.R ( R t getrevs( t repo( ( s6 /usr/lib/python2.7/dist-packages/mercurial/repoview.pyt hideablerevs s c
C@ sT | j j s t t t | } | rP| j j } | j j } g | j j D] } | | | rS | ^ qS } t j
| t j } t j } t } x° | rL| | } | | k }
x | | D]y } | t
k rδ qΜ n |
rϊ | j | n t | } | j | | t | k rΜ | | | rΜ | | | qΜ qΜ Wq Wn | S( sn Revision to be hidden (disregarding dynamic blocker)
To keep a consistent graph, we cannot hide any revisions with
non-hidden descendants. This function computes the set of
revisions that could be hidden while keeping the graph consistent.
A second pass will be done to apply "dynamic blocker" like bookmarks or
working directory parents.
( t changelogt filteredrevst AssertionErrort setR t _phasecachet phaset
parentrevst headrevst heapqt heapifyt heappopt heappushR t discardt lent add(
R t hiddent getphaset
getparentrevst rt heapR R t seent revt blockert parentt pre( ( s6 /usr/lib/python2.7/dist-packages/mercurial/repoview.pyt _getstatichidden# s. 2
!c @ sΩ | j } t } | j g | d j D] } | j ^ q) | j g | j j D] } | j | ^ qX i } t j | j
| | i | rΥ | j | j | j f d | j D n | S( s Non-cacheable revisions blocking hidden changesets from being filtered.
Get revisions that will block hidden changesets and are likely to change,
but unlikely to create hidden blockers. They won't be cached, so be careful
with adding additional computation.c 3@ s/ | ]% } | d k r | d Vq d S( i N( ( t .0t t( t nodemapR ( s6 /usr/lib/python2.7/dist-packages/mercurial/repoview.pys <genexpr>\ s N( R R t updatet Nonet parentsR t
_bookmarkst valuest tagsmodt
readlocaltagst uiR% ( R t clt blockerst part bmR ( ( R% R s6 /usr/lib/python2.7/dist-packages/mercurial/repoview.pyt _getdynamicblockersL s 02)s cache/hiddenc C@ sQ t j } | j d j | j | j t t t | | j S( s3 return sha1 hash of repository data to identify a valid cache.
We calculate a sha1 of repo heads and the content of the obsstore and write
it to the cache. Upon reading we can easily validate by checking the hash
against the stored one and discard the cache in case the hashes don't match.
t ( t hashlibt sha1R&