File: //usr/lib/python3/dist-packages/hgext/__pycache__/remotenames.cpython-310.pyc
o
�]Lb 7 � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZm Z m
Z
mZmZm
Z
mZmZmZmZmZ ddlmZ e
jr@ddlZejjZnddlZejZdZi Ze�e�Ze�� Ze�� Zed d
dd� ed d
dd� ed ddd� G dd� de�Z G dd� de!�Z"dd� Z#dd� Z$dd� Z%ed ddhd�dd� �Z&edddhd�d d!� �Z'ed"ddhd�d#d$� �Z(d%d&� Z)ed'�d(d)� �Z*ed*�d+d,� �Z+ed-�d.d/� �Z,dS )0a@ showing remotebookmarks and remotebranches in UI (EXPERIMENTAL)
By default both remotebookmarks and remotebranches are turned on. Config knob to
control the individually are as follows.
Config options to tweak the default behaviour:
remotenames.bookmarks
Boolean value to enable or disable showing of remotebookmarks (default: True)
remotenames.branches
Boolean value to enable or disable showing of remotebranches (default: True)
remotenames.hoistedpeer
Name of the peer whose remotebookmarks should be hoisted into the top-level
namespace (default: 'default')
� )�absolute_import)�_)�bin)� bookmarks�error�
extensions�logexchange�
namespaces�pycompat� registrar�
revsetlang�smartset�templateutil�util)�
stringutilNs ships-with-hg-core� remotenames� bookmarksT)�default� branches� hoistedpeers defaultc @ sl e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dd� Zdd� Zdd� Z
dd� ZeZdS )�lazyremotenamedicta�
Read-only dict-like Class to lazily resolve remotename entries
We are doing that because remotenames startup was slow.
We lazily read the remotenames file once to figure out the potential entries
and store them in self.potentialentries. Then when asked to resolve an
entry, if it is not in self.potentialentries, then it isn't there, if it
is in self.potentialentries we resolve it and store the result in
self.cache. We cannot be lazy is when asked all the entries (keys).
c C s"