403Webshell
Server IP : 217.160.0.244  /  Your IP : 216.73.217.138
Web Server : Apache
System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u100174116 ( 6746176)
PHP Version : 8.5.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/breezy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/breezy/__pycache__/config.cpython-313.pyc
�

p��g�B�
�d�%SrSSKrSSKrSSKJr SSKJr SSKJrJ	r	 SSK
r
SSKrSSKJr \"\
"5S5 SS	KJrJrJrJrJrJrJrJr SS
KJr SrSrSrSrSrSrSr Sr!Sr"Sr#\!S\"S
\#S0r$\!\!\"\#S.r%\!r&\"r'\#r(Sr)Sr*"SS\RV5r,"SS\RV5r-"SS\RV5r."SS\RV5r/"SS\RV5r0"SS\RV5r1"SS\RV5r2"SS \RV5r3"S!S"\RV5r4"S#S$\RV5r5S%r6S&r7S'r8"S(S)\
Rr5r9"S*S+5r:"S,S-\Rv5r<\<"5r="S.S/\Rv5r>\>"5r?"S0S1\:5r@"S2S3\@5rA"S4S5\A5rBS6rC"S7S8\A5rD"S9S:\:5rE\R�"S;5rGS<rHS=rI"S>S?\@5rJ\K"5rL"S@SA5rM"SBSC\R�5rO\O"5rP"SDSE5rQ"SFSG\Q5rR\PR�SH\R\RR�SI9 SH\PlU"SJSK\Q5rV\PR�SL\V\VR�SI9 "SMSN5rW"SOSP5rX"SQSR5rSSrYSTrZSUSVSWSX.r[SYr\SZr]\
Rr"0S[S\S]S^9r^"S_S`\5r_"SaSb\5r`\R�"Sc5raSdrb"SeSf\R�5rc\c"5rd\dR�\"SgS\YShSiSj95 \dR�\_"SkSSlSm95 \dR�\"SnSo\\SpSq95 \dR�\"SrS\YSsSq95 \dR�\"StSSuSm95 \dR�\"SvS]\YSwSq95 \dR�SxSySz5 \dR�\"S{S|\ZShS}Sj95 \dR�\"S~SSSm95 \dR�\"S�S\\YS�Sq95 \dR�\"S�\\6S�Sq95 \dR�\"S�S�SI95 \dR�\"S�S�SI95 \dR�\"S�\\7S�Sq95 \dR�\"S�S\\YS�Sq95 \dR�\_"S�/S�Sm95 \dR�\"S�S�S�Sm95 \dR�\"S�S�SI95 \dR�\"S�S�S�/\R�S�S�95 \dR�\"S�SS�Sm95 \dR�\"S�S�SI95 \dR�\"S�S\\YS�Sq95 \dR�\"S�S�S�Sm95 \dR�S�S�S�5 \dR�\"S�S�SI95 \dR�\"S�SS�Sm95 \dR�\"S�SS�Sm95 \dR�S�S�S�5 \dR�\"S�SS�Sm95 \dR�\"S�SS�Sm95 \dR�\"S�S\YS�Sq95 \dR�\"S�S\\YS�Sq95 \dR�S�S�S�5 \dR�S�S�S�5 \dR�S�S�S�5 \dR�\"S�S�\ZS�Sq95 \dR�\"S�S\YS�Sq95 \dR�\"S�S�\]S�Sq95 \dR�\"S�SS�/S�S�95 \dR�\"S�SS�Sm95 \dR�\"S�SS�Sm95 \dR�\"S�S�SI95 \dR�\_"S�/S�Sm95 \dR�\"S�S]\YShS�Sj95 \dR�S�S�S�5 \dR�S�S�S�5 "S�S�5rg\h"5ri\h"5rj"S�S�\g5rk"S�S�5rl"S�S�\l5rm"S�S�\l5rn"S�S�\n5ro"S�S�\o5rp"S�S�\p5rq"S�S�\p5rr"S�S�\o5rs"S�S�\p5rt"S�S�5ru"S�S�\u5rv"S�S�\g5rw"S�S�\u5rx"S�S�\u5ry0rz\{\|\l4\}S�'S]q~"S�S�5r"S�S�\5r�"S�S�\5r�"S�S�\5r�"S�S�\5r�"S�GS\5r�"GSGS\5r�"GSGS\5r�"GSGS\GR5r�\R�\|\4"5r�\R�\|\4"5r�g(�google�N)�Iterable)�BytesIO)�Callable�cast�)�lazy_importz�
import errno
import fnmatch
import re

from breezy import (
    cmdline,
    controldir,
    debug,
    lock,
    lockdir,
    osutils,
    ui,
    urlutils,
    win32utils,
    )
from breezy.i18n import gettext
)�bedding�commands�errors�hooks�
lazy_regex�registry�trace�	transport)�Option���	norecurse�
appendpath)N�nonerr�c��\rSrSrSrSrSrg)�OptionExpansionLoop�z5Loop involving %(refs)r while expanding "%(string)s".c�<�XlSRU5Ulg)Nz->)�string�join�refs)�selfrrs   �//usr/lib/python3/dist-packages/breezy/config.py�__init__�OptionExpansionLoop.__init__�s�����I�I�d�O��	�)rrN��__name__�
__module__�__qualname__�__firstlineno__�_fmtr"�__static_attributes__�r$r!rr�s��B�D�$r$rc��\rSrSrSrSrSrg)�ExpandingUnknownOption�z>Option "%(name)s" is not defined while expanding "%(string)s".c��XlX lg�N��namer)r r3rs   r!r"�ExpandingUnknownOption.__init__�s���	��r$r2Nr%r,r$r!r.r.�s��K�D�r$r.c��\rSrSrSrSrSrg)�IllegalOptionName�z!Option "%(name)s" is not allowed.c��Xlgr1�r3�r r3s  r!r"�IllegalOptionName.__init__�s���	r$r9Nr%r,r$r!r6r6�s��.�D�r$r6c��\rSrSrSrSrSrg)�ConfigContentError�z.Config file %(filename)s is not UTF-8 encoded
c��Xlgr1��filename)r rAs  r!r"�ConfigContentError.__init__���� �
r$r@Nr%r,r$r!r=r=�s��<�D�!r$r=c��\rSrSrSrSrSrg)�ParseConfigError�z5Error(s) parsing config file %(filename)s:
%(errors)sc�J�X lSRSU55Ulg)N�
c3�8# �UHoRv� M g7fr1)�msg)�.0�es  r!�	<genexpr>�,ParseConfigError.__init__.<locals>.<genexpr>�s���6�v�!���v���)rArr)r rrAs   r!r"�ParseConfigError.__init__�s�� �
��i�i�6�v�6�6��r$)rrANr%r,r$r!rErE�s��C�D�7r$rEc��\rSrSrSrSrSrg)�ConfigOptionValueError�zFBad value "%(value)s" for option "%(name)s".
See ``brz help %(name)s``c�@�[RRXUS9 g)N)r3�value�r�BzrErrorr"�r r3rUs   r!r"�ConfigOptionValueError.__init__�s����� � ��� �>r$r,Nr%r,r$r!rRrR�s��T�D�?r$rRc��\rSrSrSrSrSrg)�NoEmailInUsername��z@%(username)r does not seem to contain a reasonable email addressc��Xlgr1��username)r r_s  r!r"�NoEmailInUsername.__init__�rCr$r^Nr%r,r$r!r[r[�s��M�D�!r$r[c��\rSrSrSrSrSrg)�NoSuchConfig��z1The "%(config_id)s" configuration does not exist.c�>�[RRXS9 g)N)�	config_idrV)r res  r!r"�NoSuchConfig.__init__�s����� � �� �;r$r,Nr%r,r$r!rbrb�s��>�D�<r$rbc��\rSrSrSrSrSrg)�NoSuchConfigOption��z:The "%(option_name)s" configuration option does not exist.c�>�[RRXS9 g)N)�option_namerV�r rks  r!r"�NoSuchConfigOption.__init__�s����� � �� �?r$r,Nr%r,r$r!rhrh�s
��G�D�@r$rhc��\rSrSrSrSrSrg)�NoSuchAlias��z*The alias "%(alias_name)s" does not exist.c�>�[RRXS9 g)N)�
alias_namerV)r rrs  r!r"�NoSuchAlias.__init__�s����� � �� �=r$r,Nr%r,r$r!roro�s��7�D�>r$roc���UR5S:Xa[$UR5S:Xa[$UR5S:Xa[$[	SRU55e)�%Convert a string to a signing policy.zcheck-available�ignore�requirezInvalid signatures policy '{}')�lower�CHECK_IF_POSSIBLE�CHECK_NEVER�CHECK_ALWAYS�
ValueError�format��signature_strings r!�signature_policy_from_unicoder��s`������#4�4� � �����8�+�������9�,���
�5�<�<�=M�N�
O�Or$c��UR5S:Xa[$UR5S:Xa[$UR5S:Xa[$UR5S:Xa[$[SR
U55e)ruz
when-required�never�alwaysz
when-possiblezInvalid signing policy '{}')rx�SIGN_WHEN_REQUIRED�
SIGN_NEVER�SIGN_ALWAYS�SIGN_WHEN_POSSIBLEr|r}r~s r!�signing_policy_from_unicoder��sv������?�2�!�!�����7�*�������8�+�������?�2�!�!�
�2�9�9�:J�K�
L�Lr$c��[R"5n[USS5n[U=(a U"S5S:g5$)z6True if triple quote logic is reversed, see lp:710410.�_get_triple_quoteN�"""z''')�	configobj�	ConfigObj�getattr�bool)�conf�quotes  r!�_has_triplequote_bugr��s8����� �D��D�-�t�4�E���/�%��,�%�/�0�0r$c�d^�\rSrSrSU4Sjjr\"5(aU4SjrS\4SjrSr	Sr
U=r$)	r��c�,>�[TU]"SUSS.UD6 g)NF)�infile�
interpolationr,��superr")r r��kwargs�	__class__s   �r!r"�ConfigObj.__init__�s���
���F��e�F�v�Fr$c�>�[TU]U5nU[R:Xa[R$[R$r1)r�r�r��tdquot�tsquot)r rU�quotr�s   �r!r��ConfigObj._get_triple_quotes8����7�,�U�3�D��y�'�'�'� �'�'�'��#�#�#r$�returnc�D�[[XRU55$r1)rr��as_bool)r �section�keys   r!�get_bool�ConfigObj.get_bools���D�$�-�/�/��4�5�5r$c�F�US:XaX$XU$![a Nf=f�N�DEFAULT)�KeyError)r r�r3s   r!�	get_value�ConfigObj.get_values:���i��
��z�!��}�T�"�"���
��
�s��
 � r,r1)r&r'r(r)r"r�r�r�r�r�r+�
__classcell__�r�s@r!r�r��s/���G����	$�6��6�#�#r$r�c��^�\rSrSrSrU4SjrSrSrSrSr	Sr
S S	jrS!S
jrS!Sjr
SrS
rS"SjrS!SjrS SjrSrSrSrSrSrSrSrSrSrSrSrSrSrSr Sr!U=r"$)#�Configiz>A configuration policy - what username, editor, gpg needs etc.c�">�[TU]5 gr1r��r r�s �r!r"�Config.__init__s���
���r$c�,�[UR5e)z#Returns a unique ID for the config.)�NotImplementedErrorre�r s r!re�Config.config_ids��!�$�.�.�1�1r$c�0�SSKJn UR5nUcgURSS5nURSS5n[RU5nSU;aUR
SS/5 URRXAU[R5$)Nr)�diffz	@old_pathz
{old_path}z	@new_pathz
{new_path})�breezyr��_get_change_editor�replace�cmdline�split�extend�DiffFromTool�from_string�sys�stdout)r �old_tree�new_treer��cmds     r!�get_change_editor�Config.get_change_editor"s�����%�%�'���;���k�k�+�|�4���k�k�+�|�4���m�m�C� ���s�"��J�J��l�3�4�� � �,�,�S�H�c�j�j�Q�Qr$c��g)z6Template method to override signature checking policy.Nr,r�s r!�_get_signature_checking�Config._get_signature_checking/��r$c��g)z6Template method to override signature creation policy.Nr,r�s r!�_get_signing_policy�Config._get_signing_policy2r�r$Nc�$�URX5$)aExpand option references in the string in the configuration context.

Args:
  string: The string containing option to expand.
  env: An option dict defining additional configuration options or
    overriding existing ones.

Returns:
  The expanded string.
��_expand_options_in_string�r r�envs   r!�expand_options�Config.expand_options7����-�-�f�:�:r$c��/nUHNnURXRU5n[U[5(aURU5 M=UR	U5 MP U$)aOExpand options in  a list of strings in the configuration context.

Args:
  slist: A list of strings.

  env: An option dict defining additional configuration options or
    overriding existing ones.

  _ref_stack: Private list containing the options being
    expanded to detect loops.

Returns: The flatten list of expanded strings.
)r��
isinstance�listr��append)r �slistr��
_ref_stack�result�srUs       r!�_expand_options_in_list�Config._expand_options_in_listDsQ�����A��2�2�1�:�F�E��%��&�&��
�
�e�$��
�
�e�$���
r$c��UcgUc/nURc[RS5UlUnURRU5n[	U5S:XaU$/nSnSnUH�n	U(dU	(aURU	5 SnM&U	SSn
X�;a[
X5eURU
5 URX�U5nUc[X�5e[U[5(aSnURU5 OURU5 UR5 SnM� U(aURXbU5$SRU5nGM)a@Expand options in the string in the configuration context.

Args:
  string: The string to be expanded.

  env: An option dict defining additional configuration options or
    overriding existing ones.

  _ref_stack: Private list containing the options being
    expanded to detect loops.

Returns:
  The expanded string
Nz
({[^{}]+})TrF����)�
option_ref_re�re�compiler��lenr�r�_expand_optionr.r�r�r��popr�r)r rr�r�r��
raw_chunks�chunks�
list_value�chunk_is_ref�chunkr3rUs            r!r�� Config._expand_options_in_string\sK���>�����J����%�"$���L�!9�D������+�+�1�1�&�9�J��:��!�#��
��F��J� �L�#��#���
�
�e�,�#'�L� ��2�;�D��)�1�&�E�E��%�%�d�+� �/�/��:�F�E��}�4�T�B�B�!�%��.�.�%)�
��
�
�e�,��
�
�e�,��N�N�$�#(�L�+$�,��3�3�F��L�L�������Or$c��UbX;aX!nU$URUSS9n[U[5(aURXBU5nU$UR	XBU5nU$)NF��expand)�get_user_optionr�r�r�r�)r r3r�r�rUs     r!r��Config._expand_option�sq���?�t�{��I�E����(�(��e�(�<�E��%��&�&��4�4�U��L�����6�6�u�:�N���r$c��g)z)Template method to provide a user option.Nr,rls  r!�_get_user_option�Config._get_user_option����r$c�N�URU5nU(as[U[5(aURU5nOL[U[5(a&[
R"SRU55 OURU5n[SHnU"XU5 M U$)z�Get a generic option - no special process, no default.

Args:
  option_name: The queried option.
  expand: Whether options references should be expanded.

Returns:
  The value of the option.
z9Cannot expand "{}": Dicts do not support option expansion�get)
r�r�r�r��dictr�warningr}r��OldConfigHooks)r rkr�rU�hooks     r!r��Config.get_user_option�s����%�%�k�2����%��&�&��4�4�U�;���E�4�(�(��
�
�O�V�V�#����6�6�u�=��"�5�)�D���E�*�*��r$c��URXS9nUcU$[RU5nUc[R"SXA5 U$)aGet a generic option as a boolean.

Args:
  expand: Allow expanding references to other config values.
  default: Default value if nothing is configured

Returns:
  None if the option doesn't exist or its value can't be
    interpreted as a boolean. Returns True or False otherwise.
r�z$Value "%s" is not a boolean for "%s")r��ui�bool_from_stringrr�)r rkr��defaultr��vals      r!�get_user_option_as_bool�Config.get_user_option_as_bool�sJ��
� � �� �<���9��N��!�!�!�$���;��M�M�@�!�Q��
r$c�T�URXS9n[U[5(aU/nU$)z�Get a generic option as a list - no special process, no default.

Returns:
  None if the option doesn't exist. Returns the value as a list
  otherwise.
r�)r�r��str)r rkr��ls    r!�get_user_option_as_list�Config.get_user_option_as_list�s2��
� � �� �<���a������A��r$c��g)zSee log_format().Nr,r�s r!�_log_format�Config._log_format�r�r$c�>�UR5nUS:XaSnU$SnU$)z#Show GPG signature validity in log.�trueTF)�_validate_signatures_in_log)r r�s  r!�validate_signatures_in_log�!Config.validate_signatures_in_log�s0���1�1�3���V���F��
��F��
r$c��g)z!See validate_signatures_in_log().Nr,r�s r!r�"Config._validate_signatures_in_logr�r$c��g)�See Config.post_commit.Nr,r�s r!�_post_commit�Config._post_commitr�r$c�4�[UR55$)z.Return just the email component of a username.)�extract_email_addressr_r�s r!�
user_email�Config.user_emails��$�T�]�]�_�5�5r$c��[RRS5=(d [RRS5nU(aU$UR5nU(aU$[R
"5$)aReturn email-style username.

Something similar to 'Martin Pool <mbp@sourcefrog.net>'

$BRZ_EMAIL or $BZR_EMAIL can be set to override this, then
the concrete policy type is checked, and finally
$EMAIL is examined.
If no username can be found, NoWhoami exception is raised.
�	BRZ_EMAIL�	BZR_EMAIL)�os�environr��_get_user_idr
�
default_email)r �vs  r!r_�Config.usernamesU��
�J�J�N�N�;�'�F�2�:�:�>�>�+�+F����H��������H��$�$�&�&r$c�$�URU5$r1)�
_get_alias�r rUs  r!�	get_alias�Config.get_alias!s�����u�%�%r$c��gr1r,r,s  r!r+�Config._get_alias$s��r$c�"�UR5$r1)�
_get_nicknamer�s r!�get_nickname�Config.get_nickname's���!�!�#�#r$c��gr1r,r�s r!r2�Config._get_nickname*s��r$c�z�[RS$![a URS5nUcSnUs$f=f)N�BZR_REMOTE_PATH�bzr_remote_path�bzr)r$r%r�r�)r �paths  r!�get_bzr_remote_path�Config.get_bzr_remote_path-sF��	��:�:�/�0�0���	��'�'�(9�:�D��|����K�		�s��":�:c�L�URS5nUSL=(d X;(+$)z�Should the warning be suppressed or emitted.

Args:
  warning: The name of the warning being tested.

Returns:
  True if the warning should be suppressed, False otherwise.
�suppress_warningsN)r
)r r��warningss   r!�suppress_warning�Config.suppress_warning6s+���/�/�0C�D����$�?��(?�@�@r$c��0nUR5HAup#pEnURS5(dMU[S5SnURUS5X'MC [R
"SR
U55 U$)Nzbzr.mergetool.Fzloaded merge tools: {!r})�_get_options�
startswithr�r�r�mutterr})r �tools�oname�_value�_section�_conf_id�_parser�	tool_names        r!�get_merge_tools�Config.get_merge_toolsBs{����:>�:K�:K�:M�6�E�8�w���� 0�1�1�!�#�&6�"7�"9�:�	�#'�#7�#7��u�#E�� �;N�	���/�6�6�u�=�>��r$c��SSKJn URSRU5SS9=(d UR	US5nU$)Nr)�known_merge_toolszbzr.mergetool.{}Fr�)�
mergetoolsrQr�r}r�)r r3rQ�command_lines    r!�find_merge_tool�Config.find_merge_toolKsL��1��+�+��%�%�d�+�E�,�
�/�
�
"�
"�4��
.�	��r$)r�r1�NN)T)#r&r'r(r)�__doc__r"rer�r�r�r�r�r�r�r�r�r�rr
rrrrrr_r-r+r3r2r<rArNrTr+r�r�s@r!r�r�s����H��2�R�E�E��M�;��0E�N�$��4�*�����6�'�$&�
�$���
A��
�
r$r�c�,^�\rSrSrSrU4SjrSrU=r$)�_ConfigHooksiX�>A dict mapping hook names and a list of callables for configs.c��>�[TU]SS5 URSSS5 URSSS5 URSS	S5 URS
SS5 URSS
S5 g)�jCreate the default hooks.

These are all empty initially, because by default nothing should get
notified.
�
breezy.config�ConfigHooks�loadz@Invoked when a config store is loaded. The signature is (store).�rr�savez?Invoked when a config store is saved. The signature is (store).r�zLInvoked when a config option is read. The signature is (stack, name, value).�setzKInvoked when a config option is set. The signature is (stack, name, value).�removezHInvoked when a config option is removed. The signature is (stack, name).N�r�r"�add_hookr�s �r!r"�_ConfigHooks.__init__[s����	����-�8��
�
��N��	
�
	
�
�
��M��	
�	
�
�
��
6��		
�	
�
�
��
6��		
�	
�
�
��V��	
r$r,�r&r'r(r)rWr"r+r�r�s@r!rYrYX����H�"
�"
r$rYc�,^�\rSrSrSrU4SjrSrU=r$)�_OldConfigHooksi�rZc��>�[TU]SS5 URSSS5 URSSS5 URSS	S5 URS
SS5 URSS
S5 g)r\r]rr_zAInvoked when a config store is loaded. The signature is (config).r`raz@Invoked when a config store is saved. The signature is (config).r�zMInvoked when a config option is read. The signature is (config, name, value).rbzLInvoked when a config option is set. The signature is (config, name, value).rczIInvoked when a config option is removed. The signature is (config, name).Nrdr�s �r!r"�_OldConfigHooks.__init__�s����	����*:�;��
�
��O��	
�
	
�
�
��N��	
�	
�
�
��
7��		
�	
�
�
��
7��		
�	
�
�
��W��	
r$r,rgr�s@r!rjrj�rhr$rjc��^�\rSrSrSrSU4Sjjr\SSj5rSrSr	Sr
SrS	rSS
jr
SSjrSrS
rSrSrSrSrSrSrSrSrSrSrSSjrSrSrU=r$)�IniBasedConfigi�z1A configuration policy that draws from ini files.c�V>�[TU]5 XlXlSUlSUlg)znBase class for configuration files using an ini-like syntax.

Args:
  file_name: The configuration file path.
N)r�r"�	file_name�_contentrL�r rpr�s  �r!r"�IniBasedConfig.__init__�s(���	����"��"����
���r$c�4�U"US9nURX5 U$)z�Create a config object from a string.

Args:
  str_or_unicode: A string representing the file content. This
    will be utf-8 encoded.
  file_name: The configuration file path.
  _save: Whether the file should be saved upon creation.
�rp��_create_from_string)�cls�str_or_unicoderprar�s     r!r��IniBasedConfig.from_string�s!���Y�'��� � ��6��r$c��[U[5(aURS5n[U5UlU(aUR5 gg)N�utf-8)r�r�encoderrq�_write_config_file)r ryras   r!rw�"IniBasedConfig._create_from_string�sA���n�c�*�*�+�2�2�7�;�N���/��
���#�#�%�r$c��URbUR$URb
URnO$URc[S5eURn[	USS9UlURURl
[SHnU"U5 M
 UR$![
Ra/n[URURR5eSnAf[a [UR5ef=f)Nz'We have no content to create the configr|��encodingr_)rLrqrp�AssertionErrorr�r��ConfigObjErrorrEr�configrA�UnicodeDecodeErrorr=r)r �co_inputrLrs    r!�_get_parser�IniBasedConfig._get_parser�s����<�<�#��<�<���=�=�$��}�}�H�
�^�^�
#� �!J�K�K��~�~�H�	5�$�X��@�D�L�!%�������"�6�*�D���J�+��|�|����'�'�	@�"�1�8�8�Q�X�X�->�->�?�?��!�	5�$�T�^�^�4�4�	5�s�B'�'D�;*C%�%#Dc��URc[S5eURbURR5 [SHnU"U5 M
 g)z!Reload the config file from disk.Nz(We need a file name to reload the configr_)rpr�rL�reloadr^)r rs  r!r��IniBasedConfig.reload�sH���>�>�!� �!K�L�L��<�<�#��L�L���!���'�D���J�(r$c�6�UR5nUbUS4/$/$)z�Return an ordered list of (section_name, extra_path) pairs.

If the section contains inherited configuration, extra_path is
a string containing the additional path components.
r�)�_get_section�r r�s  r!�_get_matching_sections�%IniBasedConfig._get_matching_sections�s)���#�#�%�����b�M�?�"��Ir$c��g)z7Override this to define the section used by the config.r�r,r�s r!r��IniBasedConfig._get_section�s��r$c#�# �UR5nUbXUUR54v� gSX R54v� g7f)a`Returns an iterator of the sections specified by ``name``.

Args:
  name: The section name. If None is supplied, the default
    configurations are yielded.

Returns:
  A tuple (name, section, config_id) for all sections that will
  be walked by user_get_option() in the 'right' order. The first one
  is where set_user_option() will update the value.
N�r�re�r r3�parsers   r!�
_get_sections�IniBasedConfig._get_sectionssE����!�!�#�������t�~�~�'7�8�8�����!1�2�2�s�AAc#�N# �UcBUR5n/nUR5Hup4X#nURX545 M UR	5nUH5up5UR5HupxUWR
U5X6U4v� M M7 g![a Myf=f7f)a�Return an ordered list of (name, value, section, config_id) tuples.

All options are returned with their associated value and the section
they appeared in. ``config_id`` is a unique identifier for the
configuration file the option is defined in.

Args:
  sections: Default to ``_get_matching_sections`` if not
     specified. This gives a better control to daughter classes about
     which sections should be searched. This is a list of (name,
     configobj) tuples.
N)r�r�r�r�re�	iteritems�_quote)	r �sectionsr��section_name�_r�rer3rUs	         r!rD�IniBasedConfig._get_optionss�������%�%�'�F��H�#'�#>�#>�#@����$�2�G����� 7�8�$A��N�N�$�	�%-�!�L�&�0�0�2����V�]�]�5�1�<�F�S�S� 3�&.�� ���	�s(�+B%�B�A"B%�
B"�B%�!B"�"B%c��[$)�<Return the policy for the given (section, option_name) pair.)�POLICY_NONE)r r�rks   r!�_get_option_policy�!IniBasedConfig._get_option_policy4s���r$c�"�URSSS9$)N�
change_editorFr��r�r�s r!r��!IniBasedConfig._get_change_editor8s���#�#�O�E�#�B�Br$c�J�URS5nU(a[U5$g)�#See Config._get_signature_checking.�check_signaturesN)r�r��r �policys  r!r��&IniBasedConfig._get_signature_checking;s&���&�&�'9�:���0��8�8�r$c�J�URS5nU(a[U5$g)�See Config._get_signing_policy.�create_signaturesN)r�r�r�s  r!r��"IniBasedConfig._get_signing_policyAs&���&�&�':�;���.�v�6�6�r$c�$�URS5$)z<Get the user id from the 'email' key in the current section.�email�r�r�s r!r&�IniBasedConfig._get_user_idGs���$�$�W�-�-r$c��UR5H�up#UR5RX!5nUR	X!5nU[
:XaUs $U[:Xa
U(aMWUs $U[:Xa U(a[RXC5nUs $[SRU55e g![a M�f=f)�See Config._get_user_option.zUnexpected config policy {!r}N)r�r�r�r�r�r��POLICY_NORECURSE�POLICY_APPENDPATH�urlutilsrr�r})r rkr��
extra_pathrUr�s      r!r��IniBasedConfig._get_user_optionKs���#'�#>�#>�#@��G�
��(�(�*�4�4�W�J���,�,�W�B�F���$����+�+��� �L��,�,��$�M�M�%�<�E���$�%D�%K�%K�F�%S�T�T�'$A�*��%�
��
�s�B3�3
C�Cc�$�URS5$)�See Config.log_format.�
log_formatr�r�s r!r�IniBasedConfig._log_formatds���$�$�\�2�2r$c�$�URS5$)�&See Config.validate_signatures_in_log.rr�r�s r!r�*IniBasedConfig._validate_signatures_in_loghs���$�$�%A�B�Br$c�$�URS5$)�See Config.acceptable_keys.�acceptable_keysr�r�s r!�_acceptable_keys�IniBasedConfig._acceptable_keysls���$�$�%6�7�7r$c�$�URS5$)r�post_commitr�r�s r!r�IniBasedConfig._post_commitps���$�$�]�3�3r$c�d�UR5RSU5$![a gf=f)N�ALIASES)r�r�r�r,s  r!r+�IniBasedConfig._get_aliasts5��	��#�#�%�/�/�	�5�A�A���	��	�s�"�
/�/c�$�URS5$)N�nicknamer�r�s r!r2�IniBasedConfig._get_nicknamezs���#�#�J�/�/r$c���UR5 UR5nUcUnOX2nXA	UR	5 [
SHnU"X5 M
 g![a [U5ef=f)z�Remove a user option and save the configuration file.

Args:
  option_name: The option to be removed.
  section_name: The section the option is defined in, default to
    the default section.
Nrc)r�r�r�rhr~r)r rkr�r�r�rs      r!�remove_user_option�!IniBasedConfig.remove_user_option}sz��	
���
��!�!�#�����G��*�G�	2��$�	
���!�"�8�,�D���#�-���	2�$�[�1�1�	2�s�A�A-c���URc[S5eSSKJn [R
R
UR5n[R"U5 URUR5nUR5RU5 SSS5 [RUR5 [SHnU"U5 M
 g!,(df   NF=f)Nz&We cannot save, self.file_name is Noner)�
atomicfilera)rpr�r�r�r$r;�dirnamer
�ensure_config_dir_exists�
AtomicFiler��write�osutils�copy_ownership_from_pathr)r r��conf_dir�atomic_filers     r!r~�!IniBasedConfig._write_config_file�s����>�>�!� �!I�J�J� ��7�7�?�?�4�>�>�2���(�(��2�
�
"�
"�4�>�>�
2�k�����$�$�[�1�3��(�(����8�"�6�*�D���J�+�3�
2�s�9 C�
C')rqrLrpr1�NF)r&r'r(r)rWr"�classmethodr�rwr�r�r�r�r�rDr�r�r�r�r&r�rrr�rr+r2r�r~r+r�r�s@r!rnrn�s����;�
�����&��*�
��3�(T�<�C�9�7�.��23�C�8�4��0�$�,�r$rnc�n^�\rSrSrSrSrU4SjrU4SjrSSjrSr	Sr
SU4S	jjrU4S
jrSr
U=r$)
�LockableConfigi�a�A configuration needing explicit locking for access.

If several processes try to write the config file, the accesses need to be
serialized.

Daughter classes should use the self.lock_write() decorator method when
they upate a config (they call, directly or indirectly, the
``_write_config_file()`` method. These methods (typically ``set_option()``
and variants must reload the config file from disk before calling
``_write_config_file()``), this can be achieved by calling the
``self.reload()`` method. Note that the lock scope should cover both the
reading and the writing of the config file which is why the decorator can't
be applied to ``_write_config_file()`` only.

This should be enough to implement the following logic:
- lock for exclusive write access,
- reload the config file from disk,
- set the new value
- unlock

This logic guarantees that a writer can update a value without erasing an
update made by another writer.
�lockc�6>�[TU]US9 [R[R	UR
55Ul[R"UR5Ul[RURUR5Ulg�Nru)
r�r"r�r��safe_unicoderp�dirr�get_transport_from_path�lockdir�LockDir�	lock_name�_lockrrs  �r!r"�LockableConfig.__init__�sd���
���9��-��?�?�7�#7�#7����#G�H���#�:�:�4�8�8�D����_�_�T�^�^�T�^�^�D��
r$c�>�[TU]US5 U(a1UR5 UR5 UR	5 ggr�)r�rw�
lock_writer~�unlock)r �
unicode_bytesrar�s   �r!rw�"LockableConfig._create_from_string�s;���
��#�M�5�9��
�O�O���#�#�%��K�K�M�r$c��[R"UR5 URR	U5n[
R
URU5$�zoTakes a write lock in the directory containing the config file.

If the directory doesn't exist it is created.
)r
r�r�r�r�r��LogicalLockResultr��r �tokens  r!r��LockableConfig.lock_write�sA��
	�(�(����2��
�
�%�%�e�,���%�%�d�k�k�5�9�9r$c�8�URR5 gr1�r�r�r�s r!r��LockableConfig.unlock�����
�
���r$c�8�URR5 gr1�r��
break_lockr�s r!r�LockableConfig.break_lock�����
�
���r$c�x>�UR5 [TU]	X5 SSS5 g!,(df   g=fr1)r�r�r��r rkr�r�s   �r!r��!LockableConfig.remove_user_option�s&���
�_�_�
��G�&�{�A��
�
���+�
9c�>�URbURR(d[R"U5e[TU]5 gr1)r��is_heldr�ObjectNotLockedr�r~r�s �r!r~�!LockableConfig._write_config_file�s7����:�:��T�Z�Z�%7�%7��(�(��.�.�
��"�$r$)r�r�rr1)r&r'r(r)rWr�r"rwr�r�rr�r~r+r�r�s@r!r�r��s9����0�I�	E��:�� �B�%�%r$r�c�~^�\rSrSrSrU4SjrSr\SSj5rSr	Sr
SrS	rS
r
SSjrSU4SjjrS
rU=r$)�GlobalConfigi�z>The configuration that should be used for a specific location.c�F>�[TU][R"5S9 gr�)r�r"r
�config_pathr�s �r!r"�GlobalConfig.__init__�s���
���7�#6�#6�#8��9r$c��g)Nr�r,r�s r!re�GlobalConfig.config_id����r$c�6�U"5nURX5 U$)z�Create a config object from a string.

Args:
  str_or_unicode: A string representing the file content. This
    will be utf-8 encoded.
  save: Whether the file should be saved upon creation.
rv)rxryrar�s    r!r��GlobalConfig.from_string�s���u��� � ��6��r$c�|�UR5 URXS5 SSS5 g!,(df   g=f)�/Save option and its value in the configuration.r�N�r��_set_option)r �optionrUs   r!�set_user_option�GlobalConfig.set_user_options(��
�_�_�
����V�I�6��
�
���-�
;c�T�SUR5;aUR5S$0$)zReturn the aliases section.r�)r�r�s r!�get_aliases�GlobalConfig.get_aliasess,����(�(�*�*��#�#�%�i�0�0��Ir$c�|�UR5 URXS5 SSS5 g!,(df   g=f)z$Save the alias in the configuration.r�Nr)r rr�
alias_commands   r!�	set_alias�GlobalConfig.set_alias
s(��
�_�_�
����Z�	�B��
�
�rc��UR5 UR5 UR5RS5nU(aX;a[	U5eX!	UR5 SSS5 g!,(df   g=f)zUnset an existing alias.r�N)r�r�r�r�ror~)r rr�aliasess   r!�unset_alias�GlobalConfig.unset_aliass_��
�_�_�
��K�K�M��&�&�(�,�,�Y�7�G��j�7�!�*�-�-��#��#�#�%�
�
�
�s�AA3�3
Bc��UR5 X R5RU05U'UR5 [SHnU"XU5 M g)Nrb)r�r��
setdefaultr~r)r rrUr�rs     r!r�GlobalConfig._set_optionsN�����
�=B����%�%�g�r�2�6�:����!�"�5�)�D���u�%�*r$c#�# �UR5nUS;a
SnSU;a0US'XUUR54v� g7f)�#See IniBasedConfig._get_sections().r�r�Nr�r�s   r!r��GlobalConfig._get_sections#sM����!�!�#���$�$��D���&�$&��y�!��D�\�4�>�>�#3�4�4�s�<>c�>�UcSnUR5 [[U]X5 SSS5 g!,(df   g=fr�)r�r�r�r�rs   �r!r��GlobalConfig.remove_user_option0s5�����$�L�
�_�_�
�
�.�$�:�;�U��
�
�s	�4�
Ar,�Fr1)r&r'r(r)rWr"rer�r�rr r$r(rr�r�r+r�r�s@r!rr�sO���H�:���
��
�7�
�C�
&�&�5�V�Vr$rc#�# �URS5RS5nUH�nURS5(a[R	U5nOUnURS5RS5nSn[U5[U5:�aSnO7[
X%5H(n[RUSUS5(aM&Sn O U(dM�SRU[U5S5nX8[U54v� M� g7f)a�Keep only the sessions matching the specified location.

Args:
  sections: An iterable of section names.
  location: An url or a local path to match against.

Returns:
  An iterator of (section, extra_path, nb_parts) where nb is the
  number of path components in the section name, section is the section
  name and extra_path is the difference between location and the section
  name.

``location`` will always be a local path and never a 'file://' url but the
section names themselves can be in either form.
�/�file://TFrrN)	�rstripr�rEr��local_path_from_urlr��zip�fnmatchr)	r��location�location_partsr��section_path�
section_parts�matchedr3r�s	         r!�_iter_for_location_by_partsr?:s���� �_�_�S�)�/�/��4�N������i�(�(�#�7�7��@�L�"�L�$�+�+�C�0�6�6�s�;�
����}���N� 3�3��G��N�:�����t�A�w��Q��8�8�#�G��;����X�X�n�S��-?�-A�B�C�
��3�}�#5�5�5�?�s
�B>D�ADc�n^�\rSrSrSrU4SjrSr\SSj5rSr	S
Sjr
SrS	r\
4S
jrSrU=r$)�LocationConfiginz<A configuration object that gives the policy for a location.c�>�[TU][R"5S9 UR	S5(a[
R
U5nXlg)Nrur5)r�r"r
�locations_config_pathrEr�r7r:)r r:r�s  �r!r"�LocationConfig.__init__qsD���
���7�#@�#@�#B��C����y�)�)��3�3�H�=�H� �
r$c��g)N�	locationsr,r�s r!re�LocationConfig.config_idzs��r$c�8�U"U5nURX5 U$)z�Create a config object from a string.

Args:
  str_or_unicode: A string representing the file content. This will
    be utf-8 encoded.
  location: The location url to filter the configuration.
  save: Whether the file should be saved upon creation.
rv)rxryr:rar�s     r!r��LocationConfig.from_string}s ���8�}��� � ��6��r$c#�# �[[UR5UR5SSS9nUH5up#nX#4v� UR5UR	S5(a gM7 g![
a MGf=f7f)z?Return an ordered list of section names matching this location.c��USUS4$)Nrrr,��matchs r!�<lambda>�7LocationConfig._get_matching_sections.<locals>.<lambda>�s��u�Q�x��q��2r$T�r��reverse�ignore_parentsN)�sortedr?r�r:r�r�)r �matchesr�r��_lengths     r!r��%LocationConfig._get_matching_sections�s�����'��(8�(8�(:�D�M�M�J�2��
��
-4�(�G���%�%�
��#�#�%�g�.�6�6�7G�H�H��I�	-4���
��
�s(�<A>�'A-�&A>�-
A;�7A>�:A;�;A>c#�# �UR5nUR5HupXUUR54v� M g7f)r.N)r�r�re)r r3r��_extra_paths    r!r��LocationConfig._get_sections�sA����!�!�#��!%�!<�!<�!>��D����t�~�~�'7�8�8�"?�s�AAc��UR5URS5nU(d[$US-nUR5UUn[U$![a SnN@f=f![a
 Sn[U$f=f)r��recurseT�:policyN)r�r�r�r��
_policy_value)r r�rkr[�
policy_key�policy_names      r!r��!LocationConfig._get_option_policy�s���	��&�&�(��1�9�9�)�D�G��#�#� �9�,�
�	��*�*�,�W�5�j�A�K��[�)�)���	��G�	���	��K��[�)�)�	�s"�"A�A(�A%�$A%�(A?�>A?c��US-n[UnUbXPR5UU'gX@R5U;aUR5UU	gg)z>Set the policy for the given option name in the given section.r\N)�_policy_namer�)r r�rk�
option_policyr^r_s      r!�_set_option_policy�!LocationConfig._set_option_policy�sa�� �9�,�
�"�=�1���"�6A����w�'�
�3��-�-�/��8�8��$�$�&�w�/�
�;�9r$c�
�U[[[4;a[SR	X155eUR5 UR
5 URnURS5(aUSSnUR5nXE;aUS-U;a0XT'OUS-U;aUS-nX%UU'URXAU5 UR5 [SHnU"XU5 M SSS5 g!,(df   g=f)rz bad storage policy {!r} for {!r}r4Nr�rb)
�STORE_LOCATION�STORE_LOCATION_NORECURSE�STORE_LOCATION_APPENDPATHr|r}r�r�r:�endswithr�rdr~r)r rrU�storer:r�rs       r!r�LocationConfig.set_user_option�s�����$�%�
�
�
�?�F�F�u�U�V�V�
�_�_�
��K�K�M��}�}�H�� � ��%�%�#�C�R�=���%�%�'�F��%�(�S�.��*F�#%�� ��C��6�)�#�c�>��',�8��V�$��#�#�H�e�<��#�#�%�&�u�-���T�5�)�.��
�
�s
�B+C4�4
D�r:r2r1)r&r'r(r)rWr"rer�r�r�r�r�rdrgrr+r�r�s@r!rArAnsH���F�!�������"9�*�$<�4B�*�*r$rAc��^�\rSrSrSrU4SjrSrSrSrSr	Sr
S	rS
rSr
SrS
rSrSSjrSSjr\S4SjrSSjrSrSrSrSrSrSrSrSrU=r$)�BranchConfigi�z6A configuration object giving the policy for a branch.c�>�[TU]5 SUlSUlSUlXlURURUR4Ul	gr1)
r�r"�_location_config�_branch_data_config�_global_config�branch�_get_location_config�_get_branch_data_config�_get_global_config�option_sources�r rtr�s  �r!r"�BranchConfig.__init__�sP���
���� $���#'�� �"������%�%��(�(��#�#�
��r$c��g)Nrtr,r�s r!re�BranchConfig.config_id�rr$c��URc5[UR5UlURURlUR$r1)rr�
TreeConfigrtrer�s r!rv�$BranchConfig._get_branch_data_config�s=���#�#�+�'1�$�+�+�'>�D�$�15���D�$�$�.��'�'�'r$c���URcLURRcSURl[URR5UlUR$)Nz	memory://)rqrt�baserAr�s r!ru�!BranchConfig._get_location_config�sM��� � �(��{�{���'�#.���� �$2�4�;�;�3C�3C�$D�D�!��$�$�$r$c�R�URc[5UlUR$r1)rsrr�s r!rw�BranchConfig._get_global_config�s$�����&�".�.�D���"�"�"r$c�d�URH n[U"5U5"5nUcMUs $ g)z�This returns a user option from local, tree or global config.

They are tried in that order.  Use get_safe_value if trusted values
are necessary.
N)rxr��r rk�sourcerUs    r!�_get_best_value�BranchConfig._get_best_value�s5���)�)�F��F�H�k�2�4�E�� ���*�r$c�|�URUR4H n[U"5U5"5nUcMUs $ g)aThis variant of get_best_value never returns untrusted values.

It does not return values from the branch data, because the branch may
not be controlled by the user.

We may wish to allow locations.conf to control whether branches are
trusted in the future.
N)rurwr�r�s    r!�_get_safe_value�BranchConfig._get_safe_value
sA���0�0�$�2I�2I�J�F��F�H�k�2�4�E�� ���K�r$c�$�URS5$)z�Return the full user id for the branch.

e.g. "John Hacker <jhacker@example.com>"
This is looked up in the email controlfile for the branch.
r&�r�r�s r!r&�BranchConfig._get_user_ids���#�#�N�3�3r$c�$�URS5$)Nr�r�r�s r!r��BranchConfig._get_change_editor!s���#�#�$8�9�9r$c�$�URS5$)r�r�r�r�s r!r��$BranchConfig._get_signature_checking$s���#�#�$=�>�>r$c�$�URS5$)r�r�r�r�s r!r�� BranchConfig._get_signing_policy(s���#�#�$9�:�:r$c�d�URH nU"5RU5nUcMUs $ g)r�N)rxr�r�s    r!r��BranchConfig._get_user_option,s4���)�)�F��H�-�-�k�:�E�� ���*�r$c#�r# �URH!nU"5RU5Shv�N M# gN	7f)z"See IniBasedConfig.get_sections().N)rxr�)r r3r�s   r!r��BranchConfig._get_sections4s.����)�)�F��x�-�-�d�3�3�3�*�3�s�)7�5�
7c#�# �UR5R5Shv�N UR5nUcSUR54/nUR	5nUH5upEUR5HupgUUUUUR54v� M M7 UR
5R5Shv�N gN�N7fr�)rurDrvr�rer�rw)r r��
branch_configrer�r�r3rUs        r!rD�BranchConfig._get_options9s�����,�,�.�;�;�=�=�=��4�4�6�
���"�M�$=�$=�$?�@�A�H��N�N�$�	�%-�!�L�&�0�0�2����� ��!�-�-�/��� 3�&.��*�*�,�9�9�;�;�;�%	>�$	<�s"�"C�C�BC�;C�<C�CFc�$�U[:Xa UR5RX!5 OJU[:Xa UR	5RX5 O UR
5RXU5 U(dgU[[4;a�UR
5RU5nUb[R"SUU5 gU[:Xa>UR5nURU5nUb[R"SUU5 gggg)Nz0Value "%s" is masked by "%s" from locations.confz-Value "%s" is masked by "%s" from branch.conf)
�STORE_BRANCHrv�
set_option�STORE_GLOBALrwrrur�rr�)r r3rUrk�warn_masked�
mask_valuer�s       r!r�BranchConfig.set_user_optionOs����L� ��(�(�*�5�5�e�B�
�l�
"��#�#�%�5�5�d�B��%�%�'�7�7��U�K����\�<�0�0��2�2�4�D�D�T�J�J��%��
�
�F�����L�(�$(�$@�$@�$B�M�!.�!>�!>�t�!D�J�!�-��
�
�K�!�&��.�)�1r$c�B�UR5RX5 gr1)rv�
remove_option�r rkr�s   r!r��BranchConfig.remove_user_optionks���$�$�&�4�4�[�Or$c�$�URS5$)rr)r�r�s r!r�BranchConfig._post_commitns���#�#�N�3�3r$c��UR5nUbU$URR(aURR$[R	URR
R
S5S5$)Nr4���)�_get_explicit_nicknamertr3r��unescaper�r�r,s  r!r2�BranchConfig._get_nicknamersc���+�+�-�����L��;�;����;�;�#�#�#�� � ����!1�!1�!7�!7��!<�R�!@�A�Ar$c�&�UR5SL$)z7Return true if a nickname has been explicitly assigned.N)r�r�s r!�has_explicit_nickname�"BranchConfig.has_explicit_nicknamezs���*�*�,�D�8�8r$c�$�URS5$)Nr2r�r�s r!r��#BranchConfig._get_explicit_nickname~s���#�#�O�4�4r$c�$�URS5$)r�rr�r�s r!r�BranchConfig._log_format�s���#�#�M�2�2r$c�$�URS5$)r�rr�r�s r!r�(BranchConfig._validate_signatures_in_log�s���#�#�$A�B�Br$c�$�URS5$)r�r�r�r�s r!r��BranchConfig._acceptable_keys�s���#�#�$6�7�7r$)rrrsrqrtrxr1)r&r'r(r)rWr"rervrurwr�r�r&r�r�r�r�r�rDr�rr�rr2r�r�rrr�r+r�r�s@r!roro�s����@�

��(�%�#�

�
�4�:�?�;��4�
<�,2>�5��8P�4�B�9�5�3�C�8�8r$roz#(.*?)\s*<?([\[\]\w+.-]+@[\w+.-]+)>?c�~�[RU5nUcUS4$URS5URS54$)z9Parse e-mail username and return a (name, address) tuple.r�rr)�_username_rerM�group)r_rMs  r!�parse_usernamer��s<�����x�(�E��}��"�~���K�K��N�E�K�K��N�+�+r$c�D�[U5upU(d[U5eU$)aReturn just the address part of an email string.

That is just the user@domain part, nothing else.
This part is required to contain only ascii characters.
If it can't be extracted, raises an error.

>>> extract_email_address('Jane Tester <jane@test.com>')
"jane@test.com"
)r�r[)rLr3r�s   r!rr�s#��!��#�K�D����"�"��Lr$c�F�\rSrSrSrSrS
SjrSSjrS
SjrS
Sjr	S	r
g)r~i�zEBranch configuration data associated with its contents, not location.c�:�UR5UlXlgr1)�_get_config�_configrt)r rts  r!r"�TreeConfig.__init__�s���)�)�+����r$Nc�f�Ub[RU5$URR5$r1)rnr�r��_get_configobj)r �files  r!r��TreeConfig._get_parser�s,����!�-�-�d�3�3��|�|�*�*�,�,r$c��URR5 URRXU5sSSS5 $!,(df   g=fr1)rt�	lock_readr��
get_option)r r3r�rs    r!r��TreeConfig.get_option�s2��
�[�[�
"�
"�
$��<�<�*�*�4�'�B�%�
$�
$�s�A�
Ac��URR5 URRXU5 SSS5 g!,(df   g=f)z&Set a per-branch configuration option.N)rtr�r�r�)r rUr3r�s    r!r��TreeConfig.set_option�s4���[�[�
#�
#�
%��L�L�#�#�E��9�&�
%�
%�s�A�
Ac��URR5 URRX5 SSS5 g!,(df   g=fr1)rtr�r�r�r�s   r!r��TreeConfig.remove_option�s2���[�[�
#�
#�
%��L�L�&�&�{�A�&�
%�
%�s�A�
A)r�rtr1rV)r&r'r(r)rWr"r�r�r�r�r+r,r$r!r~r~�s ��O�
�-�
C�:�Br$r~c��\rSrSrSrSSjrSrSrSrSr	SS	jr
SS
jrSSjrSSjr
S
rSrg)�AuthenticationConfigi�z�The authentication configuration file based on a ini file.

Implements the authentication.conf file described in
doc/developers/authentication-ring.txt.
Nc��SUlUc2[R"5=UlUlUR5 gSUlXlgr1)r�r
�authentication_config_path�_input�	_filename�_check_permissions)r �_files  r!r"�AuthenticationConfig.__init__�s?������=�+2�+M�+M�+O�O�D�K�$�.��#�#�%�"�D�N��Kr$c�H�URbUR$[URSS9UlUR$![Ra/n[URURR5eSnAf[a [UR5ef=f�Nr|r�)r�r�r�r�r�rErr�rA�UnicodeErrorr=r�)r rLs  r!r�� AuthenticationConfig._get_config�s����<�<�#��<�<��	5�%�T�[�[�7�C�D�L�
�|�|���	�'�'�	@�"�1�8�8�Q�X�X�->�->�?�?���	5�$�T�^�^�4�4�	5�s�A�B!�*A>�>#B!c���SSKn[R"UR5nURUR5nURUR-UR-UR-UR-UR-U-(auUR[ ;a`[#5R%S5(dA[R&"SUR5 [ R)UR5 gggg![aJnUR[R
:wa"[R"SURU5 SnAgSnAff=f)z<Check permission of auth file are user read/write able only.rNzUnable to stat %r: %r�insecure_permissionsz^The file '%s' has insecure file permissions. Saved passwords may be accessible by other users.)�statr$r��OSError�errno�ENOENTrrF�S_IMODE�st_mode�S_IXOTH�S_IWOTH�S_IROTH�S_IXGRP�S_IWGRP�S_IRGRP�(_authentication_config_permission_errorsrrAr��add)r r��strL�modes     r!r��'AuthenticationConfig._check_permissions�s���	�������(�B�
�|�|�B�J�J�'���L�L��l�l�
��l�l�
��l�l�
��l�l�	
�
�l�l�
�
�����&N�N�$��7�7�8N�O�O��
�
�&��N�N�	�9�<�<�T�^�^�L�P�O����	��w�w�%�,�,�&����4�d�n�n�a�H���	�s� D�
E �AE�E c��[RRUR5n[R
"U5 [R"UR[R[R-S5n[R"US5nUR5RU5 UR5 g!WR5 f=f)z7Save the config file, only tests should use it for now.i��wbN)
r$r;r�r�r
r��open�O_RDWR�O_CREAT�fdopenr�r��close)r r��fd�fs    r!�_save�AuthenticationConfig._saves����7�7�?�?�4�>�>�2���(�(��2�
�W�W�T�^�^�R�Y�Y����%;�U�
C��	��	�	�"�d�#�A�����$�$�Q�'�
�G�G�I��A�G�G�I�s�6C	�	Cc��UR5nURU5nUc0XA'XAnX5U'UR5 g)z+Set an authentication configuration option.N)r�r�r�)r r�rkrUr�r�s      r!r� AuthenticationConfig._set_optionsD�����!���(�(�<�(���?�!#�D���(�G�$����
�
�r$c��SnUR5R5GH_up�[U	[R5(d[SR
U55e[U	R/SQ5up�p�U	RS5nU	RS5nU
bX:waM�Ub3X+:Xd.URS	5(aURU5(dM�UbX>:waM�U
bUbURU
5(dM�Ub
UbX�:waM�UcM�UUU
UUUUU	RS
S5US.	nURXyRSS55 S
[R ;a["R$"SU5  O Uc[&R)XX4XV5nU$![a SnGN#[
a [SR
U55ef=f![a SnGNG[
a [SR
U55ef=f)a�Returns the matching credentials from authentication.conf file.

Args:
  scheme: protocol
  host: the server address
  port: the associated port (optional)
  user: login (optional)
  path: the absolute path on the server (optional)
  realm: the http authentication realm (optional)

Returns:
  A dict containing the matching credentials or None.
  This includes:
   - name: the section name of the credentials in the
     authentication.conf file,
   - user: can't be different from the provided user if any,
   - scheme: the server protocol,
   - host: the server address,
   - port: the server port (can be None),
   - path: the absolute server path (can be None),
   - realm: the http specific authentication realm (can be None),
   - password: the decoded password, could be None if the credential
     defines only the user
   - verify_certificates: https specific, True if the server
     certificate should be verified, False otherwise.
Nz{} defined outside a section)�scheme�host�userr;�portz'port' not numeric in {}�verify_certificatesTz''verify_certificates' not boolean in {}�.�password)	r3rr�r�rr;�realmrr�password_encoding�authz Using authentication section: %r)r�r�r�r��Sectionr|r}�mapr��as_intr�r�rErj�decode_password�debug�debug_flagsrrF�credential_store_registry�get_fallback_credentials)r r�r�rrr;r�credentials�
auth_def_name�auth_def�a_scheme�a_host�a_user�a_path�a_port�a_verify_certificatess                r!�get_credentials�$AuthenticationConfig.get_credentials$s��:��'+�'7�'7�'9�'C�'C�'E�#�M��h�	�(9�(9�:�:� �!?�!F�!F�}�!U�V�V�/2����@�0�,�H�f�
S�!����0��

�(0�(8�(8�9N�(O�%��#��(:���!��N�v�'8�'8��'=�'=�$�-�-�PV�BW�BW���!�d�n���!�d�&6�t���v�?V�?V���!�d�&6�6�>���~��&��"�����$�L�L��T�:�'<�
�K�
� � ��l�l�;N�PT�.U�V���*�*�*����?��O��u(F�x��4�L�L��d�$��K����s�
����
S� �!;�!B�!B�=�!Q�R�R�
S���
-�(,�%��
� �=�D�D�]�S���
�s$�<F!�G�!G�0$G�H
�&$H
c
��X#S.n
UbXZS'UbXJS'Ub[U5U
S'UbXzS'Ub[U5U
S'U	bX�S'UR5nUR5H7up�S	H*nU
RU5U
RU5:wdM) M3 X�	M9 UR	X05 UR5 g)
a�Set authentication credentials for a host.

Any existing credentials with matching scheme, host, port and path
will be deleted, regardless of name.

Args:
  name: An arbitrary name to describe this set of credentials.
  host: Name of the host that accepts these credentials.
  user: The username portion of these credentials.
  scheme: The URL scheme (e.g. ssh, http) the credentials apply to.
  password: Password portion of these credentials.
  port: The IP port on the host that these credentials apply to.
  path: A filesystem path on the host that these credentials apply to.
  verify_certificates: On https, verify server certificates if True.
  realm: The http authentication realm (optional).
�r�rNrr�rr;rr)r�r�rr;r)rr�r�r��updater�)r r3r�rr�rrr;rr�valuesr�r��existing_valuesr�s               r!�set_credentials�$AuthenticationConfig.set_credentials�s���8�-����!)�:����%�8���� ��Y�F�6�N���!�6�N��*�,/�0C�,D�F�(�)���#�7�O��!�!�#��(.�(8�(8�(:�$�G�B��"�&�&�s�+�v�z�z�#��>��C��O�);�	�
�
�t�n�%��
�
�r$c		��URXUSXTS9n	U	bU	Sn
OSn
U
cZU(aQUc"SRUR55S-nUbUSU3nOUn[RRXkS9n
U
$Un
U
$)a�Get a user from authentication file.

Args:
  scheme: protocol
  host: the server address
  port: the associated port (optional)
  realm: the realm sent by the server (optional)
  path: the absolute path on the server (optional)
  ask: Ask the user if there is no explicitly configured username
            (optional)
  default: The username returned if none is defined (optional).

Returns:
  The found user.
N)rr;rr�{}z %(host)s username�:)r�)rr}�upperr�
ui_factory�get_username)r r�r�rrr;�prompt�askrrr�prompt_hosts            r!�get_user�AuthenticationConfig.get_user�s���4�*�*��$�T��+�
���"��v�&�D��D��<���>�!�[�[�����8�;O�O�F��#�%)�F�!�D�6�"2�K�"&�K��}�}�1�1�&�1�K�������r$c�N�URXXCXe5nUb9USn	U	b0US:Xa*[R"SRUS55 Sn	OSn	U	cPUc"SRUR	55S-nUbUSU3n
OUn
[
RRXzUS	9n	U	$)
aQGet a password from authentication file or prompt the user for one.

Args:
  scheme: protocol
  host: the server address
  port: the associated port (optional)
  user: login
  realm: the realm sent by the server (optional)
  path: the absolute path on the server (optional)

Returns:
  The found password or the one entered by the user.
Nr�sshz:password ignored in section [{}], use an ssh agent insteadr3r#z %(user)s@%(host)s passwordr$r)rrr�r}r%rr&�get_password)r r�r�rrrr;r(rrr*s           r!r/�!AuthenticationConfig.get_password�s��� �*�*�6��T�Q���"�"�:�.�H��#��%���
�
�P�W�W�#�F�+���
 ����H����~����V�\�\�^�4�7T�T����!%��a��v�.��"���}�}�1�1�&�QU�1�V�H��r$c��[RU5nURU5US'U$![a [SR	U55ef=f)Nz%{!r} is not a known password_encodingr)r�get_credential_storer�r|r}r)r rr��css    r!r�$AuthenticationConfig.decode_passwords_��	W�*�?�?��I�B�#%�"4�"4�[�"A��J������	W��D�K�K�H�U�V�V�	W�s	�-�%A)r�r�r�r1�NNNN)NNNNNN)NNNNFN)r&r'r(r)rWr"r�r�r�rrr r+r/rr+r,r$r!r�r��sv��� ��"M�@	��DH�a�P��
�
� ��1�n��
����.�bLP�'�Rr$r�c�b^�\rSrSrSrS	SjrSrS
SjrSU4SjjrSU4Sjjr	Sr
U=r$)�CredentialStoreRegistryia�A class that registers credential stores.

A credential store provides access to credentials via the password_encoding
field in authentication.conf sections.

Except for stores provided by brz itself, most stores are expected to be
provided by plugins that will therefore use
register_lazy(password_encoding, module_name, member_name, help=help,
fallback=fallback) to install themselves.

A fallback credential store is one that is queried if no credentials can be
found via authentication.conf.
c�V�URU5n[U5(aU"5nU$r1)r��callable)r r�r3s   r!r2�,CredentialStoreRegistry.get_credential_store+s%��
�X�X�h�
���B�<�<���B��	r$c�$�URU5$)z@Check if the named credentials store should be used as fallback.)�get_infor:s  r!�is_fallback�#CredentialStoreRegistry.is_fallback1s���}�}�T�"�"r$c	��SnUR5HEnURU5(dMURU5n	U	RXX4XV5nUcMD U$ U$)zzRequest credentials from all fallback credentials stores.

The first credentials store that can provide credentials wins.
N)�keysr=r2r)
r r�r�rrr;rrr3r3s
          r!r�0CredentialStoreRegistry.get_fallback_credentials5sh�����I�I�K�D��#�#�D�)�)���*�*�4�0�B��,�,�V�4�t�S�K��&���� ��r$c�">�[TU]XX5US9$)arRegister a new object to a name.

Args:
  key: This is the key to use to request the object later.
  obj: The object to register.
  help: Help text for this entry. This may be a string or
        a callable. If it is a callable, it should take two
        parameters (registry, key): this registry and the key that
        the help was registered under.
  override_existing: Raise KeyErorr if False and something has
        already been registered for that key. If True, ignore if there
        is an existing key (always register the new value).
  fallback: Whether this credential store should be
        used as fallback.
��info�override_existing)r��register)r r��obj�helprE�fallbackr�s      �r!rF� CredentialStoreRegistry.registerGs$��� �w���d�=N� �
�	
r$c	�(>�[TU]UUUUUUS9$)aCRegister a new credential store to be loaded on request.

Args:
  module_name: The python path to the module. Such as 'os.path'.
  member_name: The member of the module to return.  If empty or
        None, get() will return the module itself.
  help: Help text for this entry. This may be a string or
        a callable.
  override_existing: If True, replace the existing object
        with the new one. If False, if there is already something
        registered with the same key, raise a KeyError
  fallback: Whether this credential store should be
        used as fallback.
rC)r��
register_lazy)r r��module_name�member_namerHrErIr�s       �r!rL�%CredentialStoreRegistry.register_lazy[s.���.�w�$������/�
%�
�	
r$r,r1r5)NFF)r&r'r(r)rWr2r=rrFrLr+r�r�s@r!r7r7s8�����#�
DH��$
�2���
�
r$r7c�*�\rSrSrSrSrSSjrSrg)�CredentialStoreiz7An abstract class to implement storage for credentials.c�,�[UR5e)z;Returns a clear text password for the provided credentials.)r�r�r rs  r!r�CredentialStore.decode_password�s��!�$�"6�"6�7�7r$Nc�,�[UR5e)zwReturn the matching credentials from this credential store.

This method is only called on fallback credential stores.
)r�r)r r�r�rrr;rs       r!r�CredentialStore.get_credentials�s��"�$�"6�"6�7�7r$r,r5)r&r'r(r)rWrrr+r,r$r!rQrQs��A�8�
DH�8r$rQc��\rSrSrSrSrSrg)�PlainTextCredentialStorei�z<Plain text credential store for the authentication.conf filec��US$)�$See CredentialStore.decode_password.rr,rSs  r!r�(PlainTextCredentialStore.decode_password�s
���:�&�&r$r,N�r&r'r(r)rWrr+r,r$r!rXrX�s��P�G�'r$rX�plain�rHc��\rSrSrSrSrSrg)�Base64CredentialStorei�z8Base64 credential store for the authentication.conf filec�2�SSKnURUS5$)rZrNr)�base64�standard_b64decode)r rrbs   r!r�%Base64CredentialStore.decode_password�s��	��(�(��Z�)@�A�Ar$r,Nr\r,r$r!r`r`�s
��L�G�Br$r`rbc�&�\rSrSrSrSrSrSrg)�BzrDirConfigi�c�:�XlUR5Ulgr1)�_bzrdirr�r�)r �bzrdirs  r!r"�BzrDirConfig.__init__�s�����)�)�+��r$c���URc/[R"SRUR55eUcURRSS5 gURRUS5 g)z�Set the default stacking location.

It may be set to a location, or None.

This policy affects all branches contained by this control dir, except
for those under repositories.
NzCannot set configuration in {}r��default_stack_on)r�rrWr}rhr�r,s  r!�set_default_stack_on�!BzrDirConfig.set_default_stack_on�s\���<�<���/�/�"B�"I�"I�$�,�,�"W�X�X��=��L�L�#�#�B�(:�;��L�L�#�#�E�+=�>r$c�h�URcgURRS5nUS:XaSnU$)z�Return the default stacking location.

This will either be a location, or None.

This policy affects all branches contained by this control dir, except
for those under repositories.
Nrlr�)r�r�r,s  r!�get_default_stack_on�!BzrDirConfig.get_default_stack_on�s7���<�<������'�'�(:�;���B�;��E��r$)rhr�N)r&r'r(r)r"rmrpr+r,r$r!rfrf�s��,�
?�
r$rfc�T�\rSrSrSrSrS
SjrSSjrSSjrSr	S	r
S
rSrSr
g)�TransportConfigi�z�A Config that reads/writes a config file on a Transport.

It is a low-level object that considers config data to be name/value pairs
that may be associated with a section.  Assigning meaning to these values
is done at higher levels like TreeConfig.
c��XlX lgr1)�
_transportr�)r rrAs   r!r"�TransportConfig.__init__�s��#��!�r$Nc��UR5nUcUnOXBnURX5n[SHnU"XU5 M U$![a Us$f=f)z�Return the value associated with a named option.

Args:
  name: The name of the value
  section: The section the option is in (if any)
  default: The value to return if the value is not set
Returns: The value or default value
r�)r�r�r�r)r r3r�rr��section_objrUrs        r!r��TransportConfig.get_option�sm���'�'�)�	��?�#�K�
�'�0������.��"�5�)�D���U�#�*�����
���
�s�A�A�Ac��UR5nUcXU'OXR"U05U'[SHnU"XU5 M URU5 g)z�Set the value associated with a named option.

Args:
  value: The value to set
  name: The name of the value to set
  section: The section the option is in (if any)
Nrb)r�r+r�_set_configobj)r rUr3r�r�rs      r!r��TransportConfig.set_option�sZ���'�'�)�	��?�#�d�O�6;� � ��"�-�d�3�"�5�)�D���U�#�*����I�&r$c��UR5nUcX1	OX2U	[SHnU"X5 M
 URU5 g)Nrc)r�rr{)r rkr�r�rs     r!r��TransportConfig.remove_optionsL���'�'�)�	����&��'��4�"�8�,�D���#�-����I�&r$c
���[URRUR55n[SHnU"U5 M
 U$![
Ra
 [5s$[Raj [R"S[R[RURRUR5S55 [5s$f=f)Nr_z=Permission denied while trying to open configuration file %s.r|)rru�	get_bytesr�rr�
NoSuchFiler�PermissionDeniedrr�r��unescape_for_displayrr�)r r�rs   r!�_get_config_file� TransportConfig._get_config_files���	�����1�1�$�.�.�A�B�A�&�v�.���T�
�/��H���#�#�	��9���&�&�	��M�M�O��-�-��M�M�$�/�/�"6�"6����G���
��9��	�s�AA
�
C'�*A:C'�&C'c�r�[RURR5UR5$r1)r�rru�external_urlr�r�s r!�
_external_url�TransportConfig._external_url!s$���}�}�T�_�_�9�9�;�T�^�^�L�Lr$c�N�UR5n[USS9nUR5 U$![Ra)n[	UR
UR
55eSnAf[a [UR
55ef=f!UR5 f=fr�)
r�r�r�r�rErr�r�r=r�)r r�r�rLs    r!r��TransportConfig._get_configobj$s����!�!�#��	�
?� ��W�5��
�G�G�I����
�+�+�
G�&�q�x�x��1C�1C�1E�F�F��%�
?�(��);�);�)=�>�>�
?��
�G�G�I�s!�
0�B�$A(�('B�B�B$c���[5nUR"U5 URS5 URR	UR
U5 [SHnU"U5 M
 g)Nrra)rr��seekru�put_filer�r)r r��out_filers    r!r{�TransportConfig._set_configobj1sO���9������!��
�
�a����� � �����:�"�6�*�D���J�+r$)r�rurVr1)r&r'r(r)rWr"r�r�r�r�r�r�r{r+r,r$r!rsrs�s0���"��,'�"'��"M��r$rsc�b�\rSrSrSrSSjr\S5rSrSr	Sr
S	rS
S
jrSr
g)ri:a"An option definition.

The option *values* are stored in config files and found in sections.

Here we define various properties about the option itself, its default
value, how to convert it from stores, what to do when invalid values are
encoutered, in which config files it can be stored.
Nc	��Uc/nUc/nXlX lUcSUlO�[U[5(aU(a[S5eSUlOr[U[[[[[45(aSRU5UlO1[U5(aX0lO[SRU55eX@l
XPlX`lX�lU(a US;a[SRU55eXplg)aBuild an option definition.

Args:
  name: the name used to refer to the option.

  override_from_env: A list of environment variables which can
   provide override any configuration setting.

  default: the default value to use when none exist in the config
    stores. This is either a string that ``from_unicode`` will convert
    into the proper type, a callable returning a unicode string so that
    ``from_unicode`` can be used on the return value, or a python
    object that can be stringified (so only the empty list is supported
    for example).

  default_from_env: A list of environment variables which can
   provide a default value. 'default' will be used only if none of the
   variables specified here are set in the environment.

  help: a doc string to explain the option to the user.

  from_unicode: a callable to convert the unicode string
    representing the option value in a store or its default value.

  invalid: the action to be taken when an invalid value is
    encountered in a store. This is called only when from_unicode is
    invoked to convert a string and returns None or raise ValueError or
    TypeError. Accepted values are: None (ignore invalid values),
    'warning' (emit a warning), 'error' (emit an error message and
    terminates).

  unquote: should the unicode value be unquoted before conversion.
   This should be used only when the store providing the values cannot
   safely unquote them (see http://pad.lv/906897). It is provided so
   daughter classes can handle the quoting themselves.
Nz0Only empty lists are supported as default values�,r#z({!r} is not supported as a default value)r��errorz{} not supported for 'invalid')r3�override_from_envrr�r�r��bytesrr��int�floatr}r9�default_from_env�_help�from_unicode�unquote�invalid)	r r3r�rr�rHr�r�r�s	         r!r"�Option.__init__Ds���^�$� "���#�!���	�!2���?��D�L�
���
&�
&��$�%W�X�X��D�L�
��%��d�C��!?�
@�
@��;�;�w�/�D�L�
�g�
�
�"�L�!�:�A�A�'�J��
�!1���
�(�����w�&:�:� �!A�!H�!H��!Q�R�R��r$c��UR$r1)r�r�s r!rH�Option.help�s���z�z�r$c��UR(aUbUbURU5nURbUcU$URU5nUcfURbYURS:Xa#[
R"SX R5 U$URS:Xa[URU5eU$![[4a SnNf=f)Nr�z Value "%s" is not valid for "%s"r�)	r�r�r|�	TypeErrorr�rr�r3rR)r rk�
unicode_value�	converteds    r!�convert_from_unicode�Option.convert_from_unicode�s����<�<�E�-�-�2K�!�M�M�-�8�M����$�
�(=� � �	��)�)�-�8�I������!9��|�|�y�(��
�
�6�
�y�y��
������(�,�T�Y�Y�
�F�F�����I�&�	��I�	�s�B8�8C
�C
c�|�SnURHn[RUn U$ U$![a M+f=fr1)r�r$r%r��r rU�vars   r!�get_override�Option.get_override�sN�����)�)�C�
��
�
�3������*�����
��
�s�-�
;�;c�d�SnURHn[RUn O Ucr[	UR
5(aLUR5n[
U[5(d$[SRUR55eU$UR
nU$![a M�f=f)Nz1Callable default value for '{}' should be unicode)r�r$r%r�r9rr�rr�r}r3r�s   r!�get_default�Option.get_default�s������(�(�C�
��
�
�3����	)��=�����%�%������!�%��-�-�(�K�R�R� �I�I����.�����������
��
�s�B!�!
B/�.B/c��UR$r1r9r�s r!�get_help_topic�Option.get_help_topic�s���y�y�r$c��URnSSKJn X4RU5-
nU(aUR	U5nU$)Nr)�help_topics)rHr�r��_format_see_also�help_as_plain_text)r �additional_see_alsor]r�r�s     r!�
get_help_text�Option.get_help_text�s:������&��.�.�/B�C�C��� �3�3�F�;�F��
r$)r�rr�r�r�r3r�r�)NNNNNNT�NT)r&r'r(r)rWr"�propertyrHr�r�r�r�r�r+r,r$r!rr:sR������
����N�`�����*	��.�r$rc�,�[RU5$r1)rr��unicode_strs r!�bool_from_storer��s��
���{�+�+r$c��[U5$r1)r�r�s r!�int_from_storer��s
���{��r$i�i@Biʚ;)�K�M�Gc��SSR[5-S-n[RU[R5nURU5nSnUbAUR
5upEn[U5nU(a[UR5nXG-nU$![a$ [[S5RU55ef=f)aCConvert a human readable size in SI units, e.g 10MB into an integer.

Accepted suffixes are K,M,G. It is case-insensitive and may be followed
by a trailing b (i.e. Kb, MB). This is intended to be practical and not
pedantic.

Returns: Integer, expanded to its base-10 value if a proper SI unit is
    found, None otherwise.
z	^(\d+)(([r�z])b?)?$Nz{0} is not an SI unit.)
r�_unit_suffixesr�r��
IGNORECASErM�groupsr�r%r�r|�gettextr})r��regexp�p�mrr��unit�coeffs        r!�int_SI_from_storer��s����B�G�G�N�3�
3�i�
?�F�
�
�
�6�2�=�=�)�A�	�����A�
�C��}��x�x�z�����#�h���
Q�&�t�z�z�|�4��
�L�C��J���
Q� ��)A�!B�!I�!I�$�!O�P�P�
Q�s�<B�.Cc��[U5$r1)r�r�s r!�float_from_storer�	s
�����r$r|TF)r��list_valuesr�c�4^�\rSrSrSU4SjjrSrSrU=r$)�
ListOptioni	c
�@>�[TU]UUUURUUSS9 g)z�A list Option definition.

This overrides the base class so the conversion from a unicode string
can take quoting into account.
F�rr�r�rHr�r�N)r�r"r�)r r3rr�rHr�r�s      �r!r"�ListOption.__init__	s2���	�����-��*�*����	�	
r$c��[U[5(d[e[R	5 [RSR
U5/5 [Sn[U[5(aU(aU/nU$/nU$UnU$)Nzlist={}r�)r�rr��_list_converter_config�reset�_parser})r r��
maybe_listrs    r!r��ListOption.from_unicode"	s����+�s�+�+��O�	�$�$�&��%�%�y�'7�'7��'D�&E�F�+�F�3�
��j�#�&�&�� �L����	�����A��r$r,r5)r&r'r(r)r"r�r+r�r�s@r!r�r�	s���LP�
�$�r$r�c�F^�\rSrSrSrSU4SjjrSr\S5rSr	U=r
$)�RegistryOptioni9	z$Option for a choice from a registry.c
�X>^�[TU]UU4SjUURUUSS9 TUlg)z�A registry based Option definition.

This overrides the base class so the conversion from a unicode string
can take quoting into account.
c�>�TR$r1)�default_key�rs�r!rN�)RegistryOption.__init__.<locals>.<lambda>D	s���H�0�0r$Fr�N)r�r"r�r)r r3rr�rHr�r�s  `   �r!r"�RegistryOption.__init__<	s;���	����0�-��*�*����	�	
�!��
r$c���[U[5(d[eURR	U5$![
a% [
SRXR55ef=f)Nz?Invalid value {} for {}.See help for a list of possible values.)	r�rr�rr�r�r|r}r3)r r�s  r!r��RegistryOption.from_unicodeM	s]���+�s�+�+��O�	��=�=�$�$�[�1�1���	��:�:@�&��i�i�:X��
�	�s	�8�/A'c	���URS/nURR5H<nURSR	X RRU555 M> SR
U5$)Nz&

The following values are supported:
z	 {} - {}
r�)r�rr@r�r}�get_helpr)r �retr�s   r!rH�RegistryOption.helpX	s\���z�z�F�G���=�=�%�%�'�C��J�J�|�*�*�3�
�
�0F�0F�s�0K�L�M�(��w�w�s�|�r$r�)NNN)r&r'r(r)rWr"r�r�rHr+r�r�s@r!r�r�9	s$���.�!�"	����r$r�z({[^\d\W](?:\.\w|-\w|\w)*})c#�`# �Sn[RU5HnX4v� U(+nM g7fr�)�_option_ref_rer�)r�is_refr�s   r!�iter_option_refsr�j	s.���
�F��%�%�f�-���m�����.�s�,.c�H^�\rSrSrSrSrU4SjrU4SjrSSjrSr	U=r
$)	�OptionRegistryir	z�Register config options by their name.

This overrides ``registry.Registry`` to simplify registration by acquiring
some information from the option object itself.
c�d�[RSRU55c[U5eg)zMEnsures an option name is valid.

Args:
  option_name: The name to validate.
z{{{}}}N)r�rMr}r6rls  r!�_check_option_name�!OptionRegistry._check_option_namey	s/��������� <�=�E�#�K�0�0�Fr$c�>�URUR5 [TU]
URXRS9 g)ziRegister a new option to its name.

Args:
  option: The option to register. Its name is used as the key.
r^N)r�r3r�rFrH)r rr�s  �r!rF�OptionRegistry.register�	s1���	
������,�
������f�;�;��?r$c�H>�URU5 [TU]	XU5 g)amRegister a new option to be loaded on request.

Args:
  key: the key to request the option later. Since the registration
    is lazy, it should be provided and match the option name.

  module_name: the python path to the module. Such as 'os.path'.

  member_name: the member of the module to return.  If empty or
        None, get() will return the module itself.
N)r�r�rL)r r�rMrNr�s    �r!rL�OptionRegistry.register_lazy�	s"���	
����$�
���c��<r$c�p�URU5nURn[U5(aU"X5$U$)z0Get the help text associated with the given key.)r�rHr9)r r�r�the_helps    r!r��OptionRegistry.get_help�	s3�����#����;�;���H����D�&�&��r$r,r1)r&r'r(r)rWr�rFrLr�r+r�r�s@r!r�r�r	s"����1�@�
=��r$r��append_revisions_onlyr�z�Whether to only append revisions to the mainline.

If this is set to true, then it is not possible to change the
existing mainline of the branch.
)rr�r�rHr�z@List of GPG key patterns which are acceptable for verification.
)rrHzadd.maximum_file_size�20MBz�Size above which files should be added manually.

Files below this size are added automatically when using ``bzr add`` without
arguments.

A negative value means disable the size check.
)rr�rH�boundz�Is the branch bound to ``bound_location``.

If set to "True", the branch should act as a checkout, and push each commit to
the bound_location.  This option is normally set by ``bind``/``unbind``.

See also: bound_location.
�bound_locationz~The location that commits should go to when acting as a checkout.

This option is normally set by ``bind``.

See also: bound.
zbranch.fetch_tagsz:Whether revisions associated with tags should be fetched.
ztransform.orphan_policyzbreezy.transform�opt_transform_orphanz"bzr.workingtree.worth_saving_limit�
a^How many changes before saving the dirstate.

-1 means that we will never rewrite the dirstate file for only
stat-cache changes. Regardless of this setting, we will always rewrite
the dirstate file if a file is added/removed/renamed/etc. This flag only
affects the behavior of updating the dirstate file after we notice that
a file has been touched.
�
bugtrackerz�Default bug tracker to use.

This bug tracker will be used for example when marking bugs
as fixed using ``bzr commit --fixes``, if no explicit
bug tracker was specified.
�calculate_revnosaCalculate revision numbers if they are not known.

Always show revision numbers, even for branch formats that don't store them
natively (such as Git). Calculating the revision number requires traversing
the left hand ancestry of the branch and can be slow on very large branches.
r�z�GPG checking policy.

Possible values: require, ignore, check-available (default)

this option will control whether bzr will require good gpg
signatures, ignore them, or check them if they are
present.
�child_submit_formatz3The preferred format of submissions to this branch.�child_submit_toz/Where submissions to this branch are mailed to.r�z�GPG Signing policy.

Possible values: always, never, when-required (default), when-possible

This option controls whether bzr will always create
gpg signatures or not on commits.
zdirstate.fdatasyncaFlush dirstate changes onto physical disk?

If true (default), working tree metadata changes are flushed through the
OS buffers to physical disk.  This is somewhat slower, but means data
should not be lost if the machine crashes.  See also repository.fdatasync.
r
zDebug flags to activate.�default_format�2az#Format used when creating branches.�editorz:The command called to launch an editor to enter a message.r�r"r#zThe users identity)r�rrH�gpg_signing_keyz]GPG key to use for signing.

This defaults to the first key associated with the users email.
�languagez$Language to translate messages into.zlocks.steal_deada�Steal locks that appears to be dead.

If set to True, bzr will check if a lock is supposed to be held by an
active process from the same user on the same machine. If the user and
machine match, but no process with the given PID is active, then bzr
will automatically break the stale lock, and create a new lock for
this process.
Otherwise, bzr will prompt as normal to break the lock.
r��longz�Log format to use when displaying revisions.

Standard log formats are ``long``, ``short`` and ``line``. Additional formats
may be provided by plugins.
�mail_clientzbreezy.mail_client�opt_mail_client�output_encodingzAUnicode encoding for output (terminal encoding if not specified).�parent_locationz�The location of the default branch for pull or merge.

This option is normally set when creating a branch, the first ``pull`` or by
``pull --remember``.
r�z�Post commit functions.

An ordered list of python functions to call, separated by spaces.

Each function takes branch, rev_id as parameters.
�progress_barzbreezy.ui.text�opt_progress_bar�
public_branchz�A publically-accessible version of this branch.

This implies that the branch setting this option is not publically-accessible.
Used and set by ``bzr send``.
�
push_locationzxThe location of the default branch for push.

This option is normally set by the first ``push`` or ``push --remember``.
�push_strictz�The default value for ``push --strict``.

If present, defines the ``--strict`` option default value for checking
uncommitted changes before sending a merge directive.
zrepository.fdatasyncz�Flush repository changes onto physical disk?

If true (default), repository changes are flushed through the OS buffers
to physical disk.  This is somewhat slower, but means data should not be
lost if the machine crashes.  See also dirstate.fdatasync.
�smtp_serverzbreezy.smtp_connection�
smtp_password�
smtp_usernamezselftest.timeout�1200z>Abort selftest if one test takes longer than this many seconds�send_strictz�The default value for ``send --strict``.

If present, defines the ``--strict`` option default value for checking
uncommitted changes before sending a bundle.
zserve.client_timeoutg�r@ziIf we wait for a new request from a client for more than X seconds, consider the client idle, and hangup.r.�BRZ_SSHzSSH vendor to use.)rr�rH�stacked_on_locationz-The location where this branch is stacked on.�
submit_branchz�The branch you intend to submit your current work to.

This is automatically set by ``bzr send`` and ``bzr merge``, and is also used
by the ``submit:`` revision spec.
�	submit_toz1Where submissions from this branch are mailed to.r?z$List of warning classes to suppress.rz*Whether to validate signatures in brz log.zssl.ca_certszbreezy.transport.http�opt_ssl_ca_certsz
ssl.cert_reqs�opt_ssl_cert_reqsc�4�\rSrSrSrSrS	SjrSrSrSr	g)
riCz�A section defines a dict of option name => value.

This is merely a read-only dict which can add some knowledge about the
options. It is *not* a python dict object though and doesn't try to mimic
its API.
c��XlX lgr1��id�options)r �
section_idr#s   r!r"�Section.__init__Ks�����r$Nc�8�URRX5$r1)r#r�)r r3rr�s    r!r��Section.getPs���|�|����.�.r$c#�T# �URR5Shv�N gN7fr1)r#r@r�s r!�iter_option_names�Section.iter_option_namesSs����<�<�$�$�&�&�&�s�(�&�(c�b�SRURRUR5$)Nz<config.{} id={}>�r}r�r&r"r�s r!�__repr__�Section.__repr__Vs#��"�)�)�$�.�.�*A�*A�4�7�7�K�Kr$r!r�)
r&r'r(r)rWr"r�r)r-r+r,r$r!rrCs����
/�'�Lr$rc�D^�\rSrSrSrU4SjrSrSrSrSr	Sr
U=r$)	�MutableSectioniazDA section allowing changes and keeping track of the original values.c�D>�[TU]X5 UR5 gr1)r�r"�
reset_changes)r r$r#r�s   �r!r"�MutableSection.__init__ds���
����-����r$c���XR;a[URU'O.XR;aURUS5URU'X RU'gr1)r#�_NewlyCreatedOption�origr�rXs   r!rb�MutableSection.sethsG���|�|�#�1�D�I�I�d�O�
���
"�"�h�h�t�T�2�D�I�I�d�O�"���T�r$c��XR;a.XR;aURUS5URU'URU	gr1)r6r#r�r:s  r!rc�MutableSection.removeps9���y�y� �T�\�\�%9�"�h�h�t�T�2�D�I�I�d�O��L�L��r$c��0Ulgr1�r6r�s r!r2�MutableSection.reset_changesus	����	r$c
��URR5H�up4URU[5nURU[5nU[La!X0R
;aUR
U5 OURX55 XF:wdMsU[LaSnU[LaSnU[LaSn[R"[S5X0RUR5XFU4-5 M� UR5 g)z�Apply option value changes.

``self`` has been reloaded from the persistent storage. ``dirty``
contains the changes made since the previous loading.

Args:
  dirty: the mutable section containing the changes.
  store: the store containing the section
z	<DELETED>z	<CREATED>zTOption %s in section %s of %s was changed from %s to %s. The %s value will be saved.N)r6�itemsr��_DeletedOptionr5r#rcrbrr�r�r"r�r2)r �dirtyrk�k�expected�actual�reloadeds       r!�
apply_changes�MutableSection.apply_changesxs���!�:�:�+�+�-�K�A��Y�Y�q�.�1�F��x�x��#6�7�H���'����$��K�K��N������#�
�#��^�+�(�F��2�2�*�H��2�2�*�H��
�
��F���'�'�5�#5�#5�#7��V�T�	U��+.�:	
���r$r;)r&r'r(r)rWr"rbrcr2rEr+r�r�s@r!r0r0as$���N��#��
�'�'r$r0c�~�\rSrSrSr\r\rSr	Sr
SrSrSr
SrS	rS
rSrSrS
rSrSrSSjrSrSrg)�Storei�zCAbstract interface to persistent storage for configuration options.c��0Ulgr1��dirty_sectionsr�s r!r"�Store.__init__�s��!��r$c�,�[UR5e)z�Returns True if the Store has been loaded.

This is used to implement lazy loading and ensure the persistent
storage is queried only when needed.
)r��	is_loadedr�s r!rN�Store.is_loaded�s��"�$�.�.�1�1r$c�,�[UR5e)z(Loads the Store from persistent storage.)r�r_r�s r!r_�
Store.load����!�$�)�)�,�,r$c�,�[UR5e)zjCreate a store from a string in configobj syntax.

Args:
  bytes: A string representing the file content.
)r��_load_from_string)r r�s  r!rT�Store._load_from_string�s��"�$�"8�"8�9�9r$c�,�[UR5e)z�Unloads the Store.

This should make is_loaded() return False. This is used when the caller
knows that the persistent storage has changed or may have change since
the last load.
)r��unloadr�s r!rW�Store.unload�s��"�$�+�+�.�.r$c��U$)zwQuote a configuration option value for storing purposes.

This allows Stacks to present values as they will be stored.
r,r,s  r!r��Store.quote��	��
�r$c��U$)z\Unquote a configuration option value into unicode.

The received value is quoted as stored.
r,r,s  r!r��
Store.unquote�r[r$c�,�[UR5e)z&Saves the Store to persistent storage.)r�rar�s r!ra�
Store.save�rRr$c�V�[SURR555$)Nc3�8# �UHoRv� M g7fr1r;)rKr�s  r!rM�%Store._need_saving.<locals>.<genexpr>�s���@�#?�a�6�6�#?�rO)�anyrKrr�s r!�_need_saving�Store._need_saving�s"���@�4�#6�#6�#=�#=�#?�@�@�@r$c��UR5 UR5H'up#URU5nURX05 M) 0Ulg)aApply changes from dirty sections while checking for coherency.

The Store content is discarded and reloaded from persistent storage to
acquire up-to-date values.

Dirty sections are MutableSection which kept track of the value they
are expected to update.
N)rWr>�get_mutable_sectionrErK)r rKr$r@�cleans     r!rE�Store.apply_changes�sK��	
���
�!/�!5�!5�!7��J��,�,�Z�8�E�����,�"8�!��r$c�,�[UR5e)z�Saves the Store to persistent storage if changes occurred.

Apply the changes recorded in the mutable sections to a store content
refreshed from persistent storage.
)r��save_changesr�s r!rk�Store.save_changes�s��"�$�"3�"3�4�4r$c�,�[UR5er1)r�r�r�s r!r��Store.external_url�s��!�$�"3�"3�4�4r$c�,�[UR5e)z]Returns an ordered iterable of existing sections.

Returns: An iterable of (store, section).
)r��get_sectionsr�s r!rp�Store.get_sections�s��
"�$�"3�"3�4�4r$Nc�,�[UR5e)zSReturns the specified mutable section.

Args:
  section_id: The section identifier
)r�rg)r r$s  r!rg�Store.get_mutable_sections��"�$�":�":�;�;r$c�j�SRURRUR55$�Nz<config.{}({})>)r}r�r&r�r�s r!r-�Store.__repr__
s(�� �'�'����(?�(?��AR�AR�AT�U�Ur$rJr1)r&r'r(r)rWr�readonly_section_classr0�mutable_section_classr"rNr_rTrWr�r�rardrErkr�rprgr-r+r,r$r!rHrH�s^��M�$��*��!�
2�-�:�/���-�A�!�(5�5�5�<�Vr$rHc�H^�\rSrSrSrS	U4SjjrSrSrSrSr	Sr
U=r$)
�CommandLineStoreiz?A store to carry command line overrides for the config options.c�H>�[TU]5 Uc0n0UlSUlg�Nr�)r�r"r#r")r �optsr�s  �r!r"�CommandLineStore.__init__s&���
�����<��D������r$c�8�URR5 gr1)r#�clearr�s r!�_reset�CommandLineStore._resets�������r$c���UR5 UH&nURSS5up4X@RU'M( g![a$ [R"[S5U4-5ef=f)N�=rz0Invalid '%s', should be of the form 'name=value')r�r�r|r�CommandErrorr�r#)r �	overrides�overr3rUs     r!�
_from_cmdline�CommandLineStore._from_cmdline sq�����
��D�
�"�j�j��a�0���"'�L�L������
��)�)��N�O��g����
�s	�>�.A,c��gr|r,r�s r!r��CommandLineStore.external_url-s��r$c#�J# �XRSUR54v� g7fr1)rwr#r�s r!rp�CommandLineStore.get_sections2s����/�/��d�l�l�C�C�C�s�!#r!r1)r&r'r(r)rWr"r�r�r�rpr+r�r�s@r!rzrzs&���I���'��
D�Dr$rzc�^�\rSrSrSrU4SjrSrSrSrSr	Sr
S	rS
rSr
S\\\\44S
jrSSjrSrSrSrSrU=r$)�IniFileStorei6z�A config Store using ConfigObj for storage.

:ivar _config_obj: Private member to hold the ConfigObj instance used to
    serialize/deserialize the config file.
c�0>�[TU]5 SUlg)z+A config Store using ConfigObj for storage.N)r�r"�_config_objr�s �r!r"�IniFileStore.__init__=s���
������r$c��URSL$r1)r�r�s r!rN�IniFileStore.is_loadedBs�����t�+�+r$c� �SUl0Ulgr1�r�rKr�s r!rW�IniFileStore.unloadEs����� ��r$c�,�[UR5e)z[Load the config file bytes.

This should be provided by subclasses

Returns:
  Byte string
)r��
_load_contentr�s r!r��IniFileStore._load_contentI���"�$�"4�"4�5�5r$c�,�[UR5e)zpSave the config file bytes.

This should be provided by subclasses

Args:
  content: Config file bytes to write
)r��
_save_content�r �contents  r!r��IniFileStore._save_contentSr�r$c��UR5(agUR5nURU5 [SHnU"U5 M
 g)z(Load the store from the associated file.Nr_)rNr�rTr^)r r�rs   r!r_�IniFileStore.load]sD���>�>�����$�$�&�����w�'���'�D���J�(r$c�^�[U5n[USSS9nURbX0R:wa[S5eX0lg![Ra0nSUl[URUR55eSnAf[a [UR55ef=f)z]Create a config store from a string.

Args:
  bytes: A string representing the file content.
r|F)r�r�Nz!ConfigObj instances are not equal)rr�r�r�r�rErr�r�r=r�)r r�r��new_config_objrLs     r!rT�IniFileStore._load_from_stringfs����5�>��	:�&�x�'�u�U�N����'��!1�!1�1�$�%H�I�I�)����'�'�	B�#�D��"�1�8�8�T�->�->�-@�A�A��!�	:�$�T�%6�%6�%8�9�9�	:�s�A�B,�+B�'B,c���UR5(dgUR5(dgURR5nUR	U5 UR5 gr1)rNrdrK�copyrEra)r rKs  r!rk�IniFileStore.save_changes|sO���~�~����� � �"�"���,�,�1�1�3�����>�*��	�	�r$c���UR5(dg[5nURRU5 UR	UR55 [SHnU"U5 M
 g)Nra)rNrr�r�r��getvaluer^)r �outrs   r!ra�IniFileStore.save�sW���~�~�����i�������s�#����3�<�<�>�*���'�D���J�(r$r�c#�:# �UR5 UR
nUR(aXRSU54v� URHnXRX!U54v� M g![R[R4a gf=f7f)zXGet the configobj section in the file order.

Returns: An iterable of (store, section).
N)	r_rr�rr�r��scalarsrwr�)r �cobjr�s   r!rp�IniFileStore.get_sections�s����	��I�I�K������<�<��3�3�D�$�?�?�?� �M�M�L��4�4�\��CU�V�W�W�*��
�$�$�f�&=�&=�>�	��	�s(�B�A1�AB�1$B�B�B�Bc�P�UR5 XR;aURU$Uc
UR
nOUR
R
U05nURX5nX0RU'U$![Ra URS5 N�f=f)Nr$)r_rr�rTrKr�r+rx)r r$r��mutable_sections    r!rg� IniFileStore.get_mutable_section�s���	(��I�I�K��,�,�,��&�&�z�2�2����&�&�G��&�&�1�1�*�b�A�G��4�4�Z�I��*9���J�'�����#�#�	(��"�"�3�'�	(�s�A=�=%B%�$B%c��SURlURRU5SURl$!SURlf=f)NTF)r�r�r�r,s  r!r��IniFileStore.quote�sF��	1�+/�D���(��#�#�*�*�5�1�+0�D���(��5�D���(�s	�+?�Ac�t�U(a0[U[5(aURRU5nU$r1)r�rr��_unquoter,s  r!r��IniFileStore.unquote�s.���Z��s�+�+��$�$�-�-�e�4�E��r$c��g)NzIn-Process Store, no URLr,r�s r!r��IniFileStore.external_url�s��
*r$r�r1)r&r'r(r)rWr"rNrWr�r�r_rTrkrar�tuplerHrrprgr�r�r�r+r�r�s@r!r�r�6sj���� �
,�!�6�6��*�,
��X�h�u�U�G�^�'<�=�X�"�&1��*�*r$r�c�>^�\rSrSrSrU4SjrSrSrSrSr	U=r
$)�TransportIniFileStorei�z�IniFileStore that loads files from a transport.

:ivar transport: The transport object where the config file is located.

:ivar file_name: The config file basename in the transport directory.
c�:>�[TU]5 XlX lg)z�A Store using a ini file on a Transport.

Args:
  transport: The transport object where the config file is located.
  file_name: The config file basename in the transport directory.
N)r�r"rrp)r rrpr�s   �r!r"�TransportIniFileStore.__init__�s���	����"��"�r$c���URRUR5$![Ra' [
R"SUR55 ef=f)Nz>Permission denied while trying to load configuration store %s.)rr�rprr�rr�r�r�s r!r��#TransportIniFileStore._load_content�sU��	��>�>�+�+�D�N�N�;�;���&�&�	��M�M�P��!�!�#�
�
�	�s	�$'�;A"c�P�URRURU5 gr1)r�	put_bytesrpr�s  r!r��#TransportIniFileStore._save_content�s����� � �����9r$c��[RURR5[R	UR
55$r1)r�rrr��escaperpr�s r!r��"TransportIniFileStore.external_url�s4���}�}��N�N�'�'�)�8�?�?�4�>�>�+J�
�	
r$)rpr)r&r'r(r)rWr"r�r�r�r+r�r�s@r!r�r��s!����	#��:�
�
r$r�c�X^�\rSrSrSrS
U4SjjrS
SjrSrSrSr	U4Sjr
S	rU=r$)�LockableIniFileStorei�z?A ConfigObjStore using locks on save to ensure store integrity.c�>�UcSnX0l[TU]	X5 [R	UR
UR5Ulg)z�A config Store using ConfigObj for storage.

Args:
  transport: The transport object where the config file is located.
  file_name: The config file basename in the transport directory.
Nr�)�
lock_dir_namer�r"r�r�rr�)r rrpr�r�s    �r!r"�LockableIniFileStore.__init__
s?���� �"�M�*��
����.��_�_�T�^�^�T�5G�5G�H��
r$c��URR5 URRU5n[RURU5$r�)r�
create_prefixr�r�r�r�r�r�s  r!r��LockableIniFileStore.lock_write
s?��	
���$�$�&��
�
�%�%�e�,���%�%�d�k�k�5�9�9r$c�8�URR5 gr1r�r�s r!r��LockableIniFileStore.unlock
r�r$c�8�URR5 gr1rr�s r!r�LockableIniFileStore.break_lock
rr$c�x�UR5 UR5 SSS5 g!,(df   g=fr1)r��save_without_lockingr�s r!ra�LockableIniFileStore.save 
s$��
�_�_�
��%�%�'��
�
�s�+�
9c�">�[TU]5 gr1)r�rar�s �r!r��)LockableIniFileStore.save_without_locking%
s���
���r$)r�r�r1)
r&r'r(r)rWr"r�r�rrar�r+r�r�s@r!r�r��s*���I�I�
:�� �(�
�r$r�c�0^�\rSrSrSrSU4SjjrSrU=r$)�GlobalStorei2
zWA config store for global options.

There is a single GlobalStore for a given process.
c�>�[R"5up#[R"X!S9n[TU]XCS-5 SUlg)N��possible_transportsz.confr�)r
�_config_dirrr�r�r"r")r r�r;�kind�tr�s     �r!r"�GlobalStore.__init__8
s@����(�(�*�
���-�-��
��	����7�N�+���r$�r"r1rgr�s@r!r�r�2
s����
�r$r�c�0^�\rSrSrSrSU4SjjrSrU=r$)�
LocationStoreiA
ziA config store for options specific to a location.

There is a single LocationStore for a given process.
c�>�[R"[R"5US9n[TU]US5 SUlg)Nr�zlocations.confrF)rr�r
�
config_dirr�r"r")r r�r�r�s   �r!r"�LocationStore.__init__G
s;����-�-���� �6I�
��	����,�-���r$r�r1rgr�s@r!r�r�A
s����
�r$r�c�,^�\rSrSrSrU4SjrSrU=r$)�BranchStoreiO
zVA config store for branch options.

There is a single BranchStore for a given branch.
c�T>�[TU]URS5 XlSUlg)Nzbranch.confrt)r�r"�control_transportrtr"rys  �r!r"�BranchStore.__init__U
s$���
����1�1�=�A�����r$)rtr"rgr�s@r!r�r�O
s����
�r$r�c�(^�\rSrSrU4SjrSrU=r$)�ControlStorei[
c�F>�[TU]URSSS9 SUlg)Nzcontrol.conf�branch_lock)r��control)r�r"rr")r rir�s  �r!r"�ControlStore.__init__\
s$���
����)�)�>���W���r$r�)r&r'r(r)r"r+r�r�s@r!r�r�[
s
����r$r�c�*�\rSrSrSrSrSrSrSrg)�SectionMatcheria
z{Select sections into a given Store.

This is intended to be used to postpone getting an iterable of sections
from a store.
c��Xlgr1�rk)r rks  r!r"�SectionMatcher.__init__h
s���
r$c#�# �URR5nUH"up#URU5(dMX#4v� M$ g7fr1)rkrprM)r r�rkr�s    r!rp�SectionMatcher.get_sectionsk
s9����:�:�*�*�,�� �H�E��z�z�!�}�}��h��!�s
�6A�
Ac�,�[UR5e)zDoes the proposed section match.

Args:
  section: A Section object.

Returns:
  True if the section matches, False otherwise.
)r�rMr�s  r!rM�SectionMatcher.matcht
s��"�$�*�*�-�-r$r�N)	r&r'r(r)rWr"rprMr+r,r$r!r�r�a
s�����	.r$r�c�.^�\rSrSrU4SjrSrSrU=r$)�NameMatcheri�
c�0>�[TU]U5 X lgr1)r�r"r$)r rkr$r�s   �r!r"�NameMatcher.__init__�
s���
�����$�r$c�4�URUR:H$r1)r"r$r�s  r!rM�NameMatcher.match�
s���z�z�T�_�_�,�,r$)r$)r&r'r(r)r"rMr+r�r�s@r!r�r��
s���%�-�-r$r�c�<^�\rSrSrSU4SjjrSU4SjjrSrU=r$)�LocationSectioni�
c�>�[TU]URUR5 X lUcSnU[
R
U5US.Ulg)Nr�)�relpath�basename�
branchname)r�r"r"r#r�r�r�locals)r r�r��branch_namer�s    �r!r"�LocationSection.__init__�
sG���
������W�_�_�5�$�����K�!� �)�)�*�5�%�
��r$c�>�[TU]X5nUb�U(a�URUS-S5n[RU[5nU[:Xa[
R
X@R5n/n[U5Hdup�U(dURU	5 MU	SSn
X�R;a URURU
5 MSURU	5 Mf SR
U5nU$)Nr\rr�r�)r�r�r]r�r�r�rr�r�r�r)r r3rr�rUr_r�r�r�r��refr�s           �r!r��LocationSection.get�
s�������D�*������(�(�4�)�#3�T�:�K�"�&�&�{�K�@�F��*�*� �
�
�e�_�_�=���F�!1�%�!8�
����M�M�%�(���"�+�C��k�k�)��
�
�d�k�k�#�&6�7��
�
�e�,�"9��G�G�F�O�E��r$)r�rr1r�)r&r'r(r)r"r�r+r�r�s@r!rr�
s���	
��r$rc�2^�\rSrSrSrU4SjrSrSrU=r$)�StartingPathMatcheri�
z@Select sections for a given location respecting the Store order.c�>�[TU]U5 URS5(a[R	U5nX lg)Nr5)r�r"rEr�r7r:)r rkr:r�s   �r!r"�StartingPathMatcher.__init__�
s6���
��������y�)�)��3�3�H�=�H� �
r$c#�# �URRS5RS5nURn[	[UR
555H�up4URcU[X@R54v� M-URnURS5(a[RU5nURRU5(d'[RURU5(dM�URS5RS5nSRU[U5S5nU[XG54v� M� g7f)aGet all sections matching ``location`` in the store.

The most generic sections are described first in the store, then more
specific ones can be provided for reduced scopes.

The returned section are therefore returned in the reversed order so
the most specific ones can be found first.
r4Nr5)r:r6r�rk�reversedr�rpr"rrEr�r7r9rr�)r r;rkr�r�r<r=r�s        r!rp� StartingPathMatcher.get_sections�
s������-�-�c�2�8�8��=���
�
��"�4��(:�(:�(<�#=�>�J�A��z�z�!��_�W�m�m�D�D�D��"�:�:�L��&�&�y�1�1� (�;�;�L�I���}�}�'�'��5�5�����
�
�|�:�:�!-� 3� 3�C� 8� >� >�s� C�
� �X�X�n�S��5G�5I�&J�K�
��_�W�A�A�A�?�s
�DE�AErm)	r&r'r(r)rWr"rpr+r�r�s@r!rr�
s���J�!�B�Br$rc�4^�\rSrSrU4SjrSrSrSrU=r$)�LocationMatcheri�
c�Z>�[TU]U5 [RU5up4UR	S5(a[RU5nX lURS5nUc%[RUR5Ul	g[RU5Ul	g)Nr5rt)r�r"r��split_segment_parametersrEr7r:r�rr	r�)r rkr:�url�paramsr	r�s      �r!r"�LocationMatcher.__init__�
s����
������7�7��A������y�)�)��3�3�H�=�H� �
��j�j��*����'�0�0����?�D��'�0�0��=�D�r$c��Sn/nURR5H'up4URcUnMURU5 M) [	UVs/sHoURPM snUR
5n[
U5n/nUb&URS[XR
545 UHKup�n[U5nX�R:Xa*[XJUR5nURX�45 MKMF U$s snf)z'Get all sections matching ``location``.Nr)
rkrpr"r�r?r:�iterr�nextr	)r �no_name_section�all_sectionsr�r�r��filtered_sections�iter_all_sections�matching_sectionsr$r��lengths            r!r��&LocationMatcher._get_matching_sections�
s
�������*�*�1�1�3�J�A��z�z�!�")���#�#�G�,�	4�8�'�(�<�a�T�T�<�(�$�-�-�
��!��.�����&��$�$��O�O�]�]�C�D�
�/@�*�J�F�
��0�1�����+�-�g�4�CS�CS�T�G�%�,�,�f�->�?���/@�!� ��'
)s�Dc#��# �[UR5SSS9nUHHup#URSS5nUb[R	U5nU(a gUR
U4v� MJ g7f)Nc�*�USUSR4$)Nrrr�rLs r!rN�.LocationMatcher.get_sections.<locals>.<lambda>s��u�Q�x��q����5r$TrPrR)rSr�r�rrrk)r r�r�r�rvs     r!rp�LocationMatcher.get_sections
sm�����'�'�)�5��
��#�J�A��[�[�!1�4�8�F��!��,�,�V�4�����*�*�g�%�%�#�s�A*A,)r	r:)	r&r'r(r)r"r�rpr+r�r�s@r!rr�
s���
>�#!�J&�&r$r�_shared_storesc�t�\rSrSrSrSSjrSrSSjrSSjrSSjr	S	r
S
rSrSr
S
rSrSSjrSrg)�Stacki'z9A stack of configurations where an option can be defined.Nc�(�XlX lX0lg)a�Creates a stack of sections with an optional store for changes.

Args:
  sections_def: A list of Section or callables that returns an
    iterable of Section. This defines the Sections for the Stack and
    can be called repeatedly if needed.

  store: The optional Store where modifications will be
    recorded. If none is specified, no modifications can be done.

  mutable_section_id: The id of the MutableSection where changes
    are recorded. This requires the ``store`` parameter to be
    specified.
N)�sections_defrk�mutable_section_id)r r.rkr/s    r!r"�Stack.__init__*s��)���
�"4�r$c#�T# �URHnU"5Shv�N M gN	7f)z!Iterate all the defined sections.N)r.)r r�s  r!�
iter_sections�Stack.iter_sections=s%����)�)�H��z�!�!�*�!�s�(�&�
(c�^^^^^	^
�SnSm	[RT5m
UUU	UU
U4SjnT
b)T
R(aT
R	5nU"U5nUcWTR5HupgURT5nUcMUm	 O U"U5nT
bUcT
R
5nU"U5n[SH
nU"TTU5 M U$![a Sm
N�f=f)azReturn the *first* option value found in the sections.

This is where we guarantee that sections coming from Store are loaded
lazily: the loading is delayed until we need to either check that an
option exists or get its value, which in turn may require to discover
in which sections it can be defined. Both of these (section and option
existence) require loading the store (even partially).

Args:
  name: The queried option.
  expand: Whether options references should be expanded.
  convert: Whether the option value should be converted from
    unicode (do nothing for non-registered options).

Returns:
  The value of the option.
Nc�&>�Ub�T(aV[U[5(aTRU5nO/[R"SRT[
U555 TcTRU5nU$T(aTRTU5nU$)Nz8Cannot expand "{}": {} does not support option expansion)	r�rr�rr�r}�typer�r�)r�convertr��found_storer3�optr s ������r!�expand_and_convert�%Stack.get.<locals>.expand_and_convertcs�������!�#�s�+�+�"�<�<�S�A���
�
�D�DJ�F� $�d�3�i�E���;�%�-�-�c�2�C��J���2�2�;��D�C��Jr$r�)�option_registryr�r�r�r�r2r�r^)r r3r�r7rUr:rkr�rr8r9s````     @@r!r��	Stack.getFs����&����	�!�%�%�d�+�C�
	�	�,�?�s�4�4��$�$�&�E�&�u�-�E��=�"&�"4�"4�"6������D�)���$�"'�K��	#7�
'�u�-�E���5�=����)��*�5�1����&�D���t�U�#�'����U�	��C�	�s�C�C�Cc�$�URX5$)aExpand option references in the string in the configuration context.

Args:
  string: The string containing option(s) to expand.
  env: An option dict defining additional configuration options or
    overriding existing ones.

Returns:
  The expanded string.
r�r�s   r!r��Stack.expand_options�r�r$c��UcgUc/nUnSnU(a�Sn/n[U5H�upxU(dURU5 MSnUSSn	X�;a[X5eURU	5 URX�U5n
U
c[	X�5eURU
5 UR5 M� SR
U5nU(aM�U$)a?Expand options in the string in the configuration context.

Args:
  string: The string to be expanded.
  env: An option dict defining additional configuration options or
    overriding existing ones.
  _refs: Private list (FIFO) containing the options being expanded
    to detect loops.

Returns: The expanded string.
NTFrr�r�)r�r�rr�r.r�r)r rr��_refsr��expandedr�r�r�r3rUs           r!r��Stack._expand_options_in_string�s����>���=��E�������H��F�!1�&�!9�
����M�M�%�(�#�H� ��2�;�D��}�1�&�@�@��L�L��&� �/�/��5�A�E��}�4�T�B�B��M�M�%�(��I�I�K�":��W�W�V�_�F�#�h�$�
r$c�h�UbX;aX!nU$URUSSS9nURXBU5nU$)NF�r�r7)r�r�)r r3r�rArUs     r!r��Stack._expand_option�sH���?�t�{��I�E����H�H�T�%��H�?�E��2�2�5�u�E�E��r$c�V�URnURUR5nX4$)a(Get the MutableSection for the Stack.

This is where we guarantee that the mutable section is lazily loaded:
this means we won't load the corresponding store before setting a value
or deleting an option. In practice the store will often be loaded but
this helps catching some programming errors.
)rkrgr/)r rkr�s   r!�_get_mutable_section�Stack._get_mutable_section�s+���
�
���+�+�D�,C�,C�D���~�r$c��UR5up4URXRU55 [SHnU"XU5 M g)zSet a new value for the option.rbN)rHrbr�r^)r r3rUrkr�rs      r!rb�	Stack.set�s@���2�2�4������D�+�+�e�,�-���&�D���U�#�'r$c�z�UR5up#URU5 [SHnU"X5 M
 g)zRemove an existing option.rcN)rHrcr^)r r3r�r�rs     r!rc�Stack.remove�s5���.�.�0�
�����t����)�D����*r$c�`�SRURR[U55$rur,r�s r!r-�Stack.__repr__�s#�� �'�'����(?�(?��D��J�Jr$c�x�[Rb([RRR5$/$r1)r��
_global_state�cmdline_overridesrpr�s r!�_get_overrides�Stack._get_overrides�s.�����+��'�'�9�9�F�F�H�H��	r$c�^�Uc[RnUc/[mU4Sjn[(dSSKnURU5 SqOURmUR5nTU$![a
 UTU'Us$f=f)a?Get a known shared store.

Store urls uniquely identify them and are used to ensure a single copy
is shared across all users.

Args:
  store: The store known to the caller.
  state: The library state where the known stores are kept.

Returns: The store received if it's not a known one, an already known
    otherwise.
Nc�X>�TR5HupUR5 M gr1)r>rk)�_krk�storess  �r!�save_config_changes�3Stack.get_shared_store.<locals>.save_config_changess!���!'����I�B��&�&�(�"0r$rT)	r�rQr*� _shared_stores_at_exit_installed�atexitrF�
config_storesr�r�)r rk�staterYr\rrXs      @r!�get_shared_store�Stack.get_shared_store�s�����=��(�(�E��=�#�F�
)�4�3����� 3�4�37�0���(�(�F�� � �"��	��#�;����	��F�3�K��L�	�s�$A)�)A=�<A=)r/r.rkrV)TTr1)r&r'r(r)rWr"r2r�r�r�r�rHrbrcr-rSr_r+r,r$r!r,r,'sE��C�5�&"�C�J;�(�T�
�$��K��&r$r,c�0^�\rSrSrSrSU4SjjrSrU=r$)�MemoryStackizpA configuration stack defined from a string.

This is mainly intended for tests and requires no disk resources.
c�x>�[5nUbURU5 [TU]
UR/U5 g)aCreate an in-memory stack from a given content.

It uses a single store based on configobj and support reading and
writing options.

Args:
  content: The initial content of the store. If None, the store is
    not loaded and ``_load_from_string`` can and should be used if
    needed.
N)r�rTr�r"rp)r r�rkr�s   �r!r"�MemoryStack.__init__s8���������#�#�G�,�
���%�,�,�-�u�5r$r,r1rgr�s@r!rbrbs����
6�6r$rbc�8^�\rSrSrSrU4SjrU4SjrSrU=r$)�_CompatibleStacki0a*Place holder for compatibility with previous design.

This is intended to ease the transition from the Config-based design to the
Stack-based design and should not be used nor relied upon by plugins.

One assumption made here is that the daughter classes will all use Stores
derived from LockableIniFileStore).

It implements set() and remove () by re-loading the store before applying
the modification and saving it.

The long term plan being to implement a single write by store to save
all modifications, this class should not be used in the interim.
c�>�URR5 [TU]
X5 URR	5 gr1)rkrWr�rbra�r r3rUr�s   �r!rb�_CompatibleStack.set@s-����
�
����
���D� ��
�
���r$c�>�URR5 [TU]
U5 URR	5 gr1)rkrWr�rcra�r r3r�s  �r!rc�_CompatibleStack.removeGs-����
�
����
���t���
�
���r$r,)	r&r'r(r)rWrbrcr+r�r�s@r!rfrf0s���
���r$rfc�,^�\rSrSrSrU4SjrSrU=r$)�GlobalStackiOz�Global options only stack.

The following sections are queried:

* command-line overrides,

* the 'DEFAULT' section in bazaar.conf

This stack will use the ``DEFAULT`` section in bazaar.conf as its
MutableSection.
c�>�UR[55n[TU]
UR[US5R/USS9 g)Nr��r/)r_r�r�r"rSr�rp)r �gstorer�s  �r!r"�GlobalStack.__init__\sH����&�&�{�}�5��
���
�
 �
 �+�f�i�"@�"M�"M�N��(�	�	
r$r,rgr�s@r!rnrnOs���
�
�
r$rnc�,^�\rSrSrSrU4SjrSrU=r$)�
LocationStackiea�Per-location options falling back to global options stack.


The following sections are queried:

* command-line overrides,

* the sections matching ``location`` in ``locations.conf``, the order being
  defined by the number of path components in the section glob, higher
  numbers first (from most specific section to most generic).

* the 'DEFAULT' section in bazaar.conf

This stack will use the ``location`` section in locations.conf as its
MutableSection.
c�F>�UR[55nURS5(a[R	U5nUR[55n[TU]UR[X!5R[US5R/UUS9 g)z]Make a new stack for a location and global configuration.

Args:
  location: A URL prefix to
r5r�rpN)r_r�rEr�r7r�r�r"rSrrpr�)r r:�lstorerqr�s    �r!r"�LocationStack.__init__ws�����&�&�}��7�����y�)�)��3�3�H�=�H��&�&�{�}�5��
����#�#���1�>�>��F�I�.�;�;�
�

�'�	�	
r$r,rgr�s@r!rtrtes����"
�
r$rtc�T^�\rSrSrSrU4SjrS	SjrSrU4SjrU4Sjr	Sr
U=r$)
�BranchStacki�aPer-location options falling back to branch then global options stack.

The following sections are queried:

* command-line overrides,

* the sections matching ``location`` in ``locations.conf``, the order being
  defined by the number of path components in the section glob, higher
  numbers first (from most specific section to most generic),

* the no-name section in branch.conf,

* the ``DEFAULT`` section in ``bazaar.conf``.

This stack will use the no-name section in ``branch.conf`` as its
MutableSection.
c	�\>�UR[55nUR5nUR[55n[TU]UR[X!R5R[US5R[US5R/U5 Xlgr�)r_r��_get_config_storer�r�r"rSrr�rpr�rt)r rtrv�bstorerqr�s     �r!r"�BranchStack.__init__�s�����&�&�}��7���)�)�+���&�&�{�}�5��
����#�#�����4�A�A��F�D�)�6�6��F�I�.�;�;�	
�
�	
��r$c�8�URRU5$r1�rtr�r�s  r!r��BranchStack.lock_write�����{�{�%�%�e�,�,r$c�6�URR5$r1�rtr�r�s r!r��BranchStack.unlock�����{�{�!�!�#�#r$c�x>�UR5 [TU]	X5 SSS5 g!,(df   g=fr1)r�r�rbrhs   �r!rb�BranchStack.set�s%���
�_�_�
��G�K��$��
�
�rc�x>�UR5 [TU]	U5 SSS5 g!,(df   g=fr1)r�r�rcrks  �r!rc�BranchStack.remove�s%���
�_�_�
��G�N�4� ��
�
�r�rtr1�r&r'r(r)rWr"r�r�rbrcr+r�r�s@r!ryry�s&����$
�-�$�%�!�!r$ryc�,^�\rSrSrSrU4SjrSrU=r$)�RemoteControlStacki�z"Remote control-only options stack.c�|>�UR5n[TU]	[US5R/U5 Xlgr1)r{r�r"r�rp�
controldir)r ri�cstorer�s   �r!r"�RemoteControlStack.__init__�s5����)�)�+��
���+�f�d�3�@�@�A�6�J� �r$)r�rgr�s@r!r�r��s���,�!�!r$r�c�T^�\rSrSrSrU4SjrS	SjrSrU4SjrU4Sjr	Sr
U=r$)
�BranchOnlyStacki�zBranch-only options stack.c�|>�UR5n[TU]	[US5R/U5 Xlgr1)r{r�r"r�rprt)r rtr|r�s   �r!r"�BranchOnlyStack.__init__�s5����)�)�+��
���+�f�d�3�@�@�A�6�J��r$c�8�URRU5$r1rr�s  r!r��BranchOnlyStack.lock_write�r�r$c�6�URR5$r1r�r�s r!r��BranchOnlyStack.unlock�r�r$c�>�UR5 [TU]	X5 URR	5 SSS5 g!,(df   g=fr1)r�r�rbrkrkrhs   �r!rb�BranchOnlyStack.set�s5���
�_�_�
��G�K��$��J�J�#�#�%��
�
���*A�
Ac�>�UR5 [TU]	U5 URR	5 SSS5 g!,(df   g=fr1)r�r�rcrkrkrks  �r!rc�BranchOnlyStack.remove�s5���
�_�_�
��G�N�4� ��J�J�#�#�%��
�
�r�r�r1r�r�s@r!r�r��s$���$��
-�$�&�&�&r$r�c��\rSrSrSrS/rS\"SS\S9\"SS	S
9\"SSS
9/rS
/r	\
RSSj5rSSjr
SrSrSrSrSrSrg)�
cmd_configi�a�Display, set or remove a configuration option.

    Display the active value for option NAME.

    If --all is specified, NAME is interpreted as a regular expression and all
    matching options are displayed mentioning their scope and without resolving
    option references in the value). The active value that bzr will take into
    account is the first one displayed for each option.

    If NAME is not given, --all .* is implied (all options are displayed for the
    current scope).

    Setting a value is achieved by using NAME=value without spaces. The value
    is set in the most relevant scope and can be checked by displaying the
    option again.

    Removing a value is achieved by using --remove NAME.
    zname?�	directory�scopez5Reduce the scope to the specified configuration file.)rHr6�allz8Display all the defined values for the matching options.r^rcz.Remove the option from the configuration file.�
configurationNc��SSKJn UcSnURU5n[R	U5nU(aU(a[
R"S5eU(aURXU5 gUcURSX45 gURSS5upU(a[
R"S5eURXX45 g![a0 U(aURXU5 gURXU5 gf=f)Nr)�directoriesrz*--all and --remove are mutually exclusive.z.*r�zOnly one option can be set.)
�directory_servicer��dereferencer��
normalize_urlrrW�_remove_config_option�_show_matching_optionsr��_set_config_optionr|�_show_value)r r3r�r�r�rcr�rUs        r!�run�cmd_config.runs���2����I��+�+�I�6�	��*�*�9�5�	��c��/�/�"N�O�O�
��&�&�t��>�
�\��'�'��i�?�
G�"�j�j��a�0���� �/�/�*G�H�H��'�'��Y�F���
=���/�/���G��$�$�T�e�<�
=�s�C�#D�0D�Dc�@�Ub�US:Xa
[5$US:Xa[U5$US:Xab[RR	U5upEnU(a)URUR
5R5 UR5$[U5e[RR	U5upEnU(a)URUR
5R5 UR5$![Ra [U5s$f=f)z�Get the configuration stack specified by ``directory`` and ``scope``.

Args:
  directory: Where the configurations are derived from.
  scope: A specific config to start from.
  write_access: Whether a write access to the stack will be
    attempted.
r�rFrt)rnrtr��
ControlDir�open_containing_tree_or_branch�add_cleanupr�r��get_config_stackrbr�NotBranchError)r r�r��write_accessr��brs      r!�
_get_stack�cmd_config._get_stack5s������� �"�}�$��+�%�$�Y�/�/��(�"�'�2�2�Q�Q���
��� ��$�$�R�]�]�_�%;�%;�<��*�*�,�,��u�%�%�
0�'�2�2�Q�Q���
��� ��$�$�R�]�]�_�%;�%;�<��*�*�,�,���(�(�
0�$�Y�/�/�
0�s�A!C;�;D�Dc�"�SU;aSU-S-nU$)NrHr�r,r,s  r!�_quote_multiline�cmd_config._quote_multilineYs���5�=��E�M�E�)�E��r$c���URX#5nURUSSS9nUb<URU5nURR	SRU55 g[
U5e)NTFrEz{}
)r�r�r��outfr�r}rh)r r3r�r�r�rUs      r!r��cmd_config._show_value^s^�����y�0������d�E��:�����)�)�%�0�E��I�I�O�O�F�M�M�%�0�1�$�T�*�*r$c��[R"U5nUR5 SnSnURX#5nUR	5GH/upxUR5GHn	UR
U	5(dMXGR:waBURRSRUR55 URnSnURbOXXR:wa@URRSRUR55 URnURU	SS9n
URU
5n
URRSRX�55 GM GM2 g)Nz{}:
z  [{}]
Fr�z
  {} = {}
)
r�lazy_compile�_compile_and_collapser�r2r)�searchr"r�r�r}r�r�)r r3r�r��cur_store_id�cur_sectionr�rkr�rHrUs           r!r��!cmd_config._show_matching_optionshs���&�&�t�,��	
�"�"�$��������y�0��"�0�0�2�N�E� �2�2�4���;�;�u�%�%�#�x�x�/��	�	������u�x�x�(@�A�',�x�x��&*���z�z�-�+���2K��	�	���
�(9�(9�'�*�*�(E�F�&-�j�j��#�K�K��e�K�<�E� �1�1�%�8�E��I�I�O�O�M�$8�$8��$F�G�5�3r$c�z�URX4SS9nURX5 URR5 g)NT�r�)r�rbrkrk)r r3rUr�r�r�s      r!r��cmd_config._set_config_option�s0�����y�d��C��������
�
���!r$c���Uc[R"S5eURX#SS9nURU5 URR5 g![a [U5ef=f)Nz%--remove expects an option to remove.Tr�)rr�r�rcrkrkr�rh)r r3r�r�r�s     r!r�� cmd_config._remove_config_option�sf���<��%�%�&M�N�N����y�d��C��	+��K�K����J�J�#�#�%���	+�$�T�*�*�	+�s�+A�A-r,)NFNNFr�)r&r'r(r)rW�
takes_args�
CommandOptionr�
takes_options�	_see_alsor�display_commandr�r�r�r�r�r�r�r+r,r$r!r�r��s����G�&��J�	�	��H��	
�
	��K�	
�	�h�%U�V��M�"!�!�I�
���G��G�<"0�H�
+�H�6"�	+r$r�)��
__docformat__r$r��collections.abcr�ior�typingrrr�r�r	�globalsr�r
rrr
rrrrrrr�ryr{rzr�r�r�r�r�r�r�rbr]rgrhrir�r�rWrr.r6r=rErRr[rbrhror�r�r�r�r��HooksrYr^rjrrnr�rr?rAror�r�r�rr~rbr�r��Registryr7rrQrXrFrWr�r`rfrsr�r�r�r�r�r�r�r�r�r�r�r<rLr'r�objectr5r?r0rHrzr�r�r�r�r�r�r�r�r�rrrr*r�r�__annotations__r[r,rbrfrnrtryr�r��Commandr��test_store_builder_registry�test_stack_builder_registryr,r$r!�<module>r�sf��&��
�8�t
�
�$��!��
�$���I���*W�V�V�+�����������
�
������������k��|�����!�#�	�
���+��-������$�&�/�/�$��V�_�_�������!����!�7�v���7�?�V�_�_�?�!����!�<�6�?�?�<�@����@�>�&�/�/�>�P�
M�1�#�	�#�#�#�4}�}�@
%
�5�;�;�%
�P�n��%
�e�k�k�%
�P!�"��p�V�p�fG%�^�G%�TLV�>�LV�^16�hi*�^�i*�Xq8�6�q8�h�&�&�'M�N��,�
� B��B�B,/�5�(�L�L�^
]
�h�/�/�]
�@4�5��8�8�"'��'��"�"��
%�,D�,L�,L�#��)0��%�	B�O�	B��"�"��#�*?�*G�*G�#��
!�!�Hd�d�N_�_�J,���5�u�5���4�#�,�,���d�%���
'��'�T$�V�$�N�(�(�)L�M����.�X�&�&�.�b!�"��
���
���$����
�������������
���&��	�����
���$��	�����
����
�����
���$��	�	�����1�3I�����
�,��#�����"���
����
�����
���$��	�
����
��!�2��	
�� ���
��
F������
�� U���
���
��"�0��	�����
���$��	�
�����}�b�/I�J�����
��T�0U�V�����
�8�V�W�����
��&��4��%�%�
!�	�����
�����
����
�:�B�C�����
���$�	�	��"���
����	�����m�-A�CT�U����
��
P������
����	�����
����
�����n�.>�@R�S����
����	�����
�����
����
���$��	
�����
���$��	�
����m�-E�}�U�����-�������-������
���#�
M�	�����
���$��	
�����
���%�<�	�����
�
�t�	�{�AU���
���
���
@������
����	�����
�;�T�U�������R�.T���
���
�$��$��
=�������+�-?������,�.A��
L�L�0�h��?����?�>�W�>�BmV�mV�`!D�u�!D�HT*�5�T*�n(
�L�(
�b(�0�(�h�&���(��	�'�	��'��.�.�>-�.�-� �g� �F,B�.�,B�^C&�n�C&�P$&���S�%�Z� �%�#(� �o�o�d6�%�6�.�u��>
�%�
�,$
�E�$
�N0!�%�0!�j
!��
!�&�e�&�>e+��!�!�e+�j'�/�/��X�
�>�@��
'�/�/��X�
�>�@�r$

Youez - 2016 - github.com/yon3zu
LinuXploit