ROOTPLOIT
Server: Apache
System: Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User: ws67150586 (67150586)
PHP: 8.3.36
Disabled: NONE
Upload Files
File: //kunden/kunden/kunden/lib/python3/dist-packages/mercurial/__pycache__/cmdutil.cpython-313.pyc
�

6�h�0��
�SSKJr SSKrSSKrSSKrSSKrSSKrSSKrSSKJ	r	J
r
JrJrJ
r
JrJrJrJr SSKJr SSKJrJrJr SSKJr \R (aSSKrSSKJrJrJrJrJr J!r!J"r"J#r#J$r$J%r%J&r'J(r)J*r+J,r,J-r-J.r.J/r/J0r0J1r1J2r2J3r3J4r4J5r5J6r7J8r8J9r9J:r:J;r;J<r<J=r> SS	K?J@r@JArAJBrB SS
KCJDrE \(aSSKFJGrH SSKJIrJ \<R�rKS
SS\"S54/rLSSS\"S54/rMSSS\"S5\"S54SSS\"S5\"S54SSS\"S54/rNSS/\"S5\"S54SS /\"S!5\"S54/rOS"S#S\"S$5\"S%54S&S'S\"S(5\"S)54/rPS*S+S\"S,5\"S-54S.S/S\"S05\"S154/rQS2S3S\"S454S5S6S\"S754/rRS8S9S\"S:5\"S;54/rSSS<S\"S=5\"S>54S8S9S\"S:5\"S;54/rTS?S@S\"SA54SBSCS\"SD54S&SES\"SF5\"SG54SHSIS\"SJ54SSKS\"SL54SMSNS\"SO54/\T-rUSPSQS\"SR54SBSCS\"SS54SSTS\"SU54SSVS\"SW54/rVSXSYS\"SZ54S[S\S\"S]54S^S_S\"S`54SaSbS\"Sc54/rWSSdS\"Se54S?SfS\"Sg54SShS\"Si54/\W-S5SjS\"Sk5\"SG54SSKS\"SL54SSlS\"Sm5\"Sn54/-rXSoSpS\"Sq5\"Sr54/rYSsStS\"Su5\"Sv54/rZSwSxS\"Sy54/r[SzS{S|\"S}54S"S~S|\"S54SS�S\"S�54/r\S�r]S�S�jr^S�S�jr_S�S�jr`S�S�jraS�rbS�rcS�rdS�reS�rfS�S�jrgS�S�jrhS�riS�rj"S�S�5rkS�S�jrlS�rm\R�"S�S�9"S�S�55roS�rpS�S�jrqS�S�jrrS�rsS�S�jrtS�S�jruS�S�jrvS�rwS�S�jrxS�ryS�rzS�S�jr{S�S�jr|S�S�jr}S�S�jr~S�r"S�S�5r�S�S�S�jjr�S�S�jr�S�r�S�S�S�jjr/r�/r�0r�0r�S�r�/r�0r�S�r�S�r�S�r�S�r�S�S�jr�S�S�jr�S�S�jr�S�r�S�r�S�r�S�r�S�r�S�S�jr�S�r�S�r�S�r�"S�S�5r�S�r�S�r�S�S�jr�S�S�jr�S�S�jr�S�r�S�r�S�r�S�S�jr�S�r�S�r�S�S�jr�\<GRP"5r�\<GRP"5r�\<GRP"5r�S�S�jr�S�r�S�r�S�r�S�r�S�r�S�r�S�S�jr�S�r�S�r�S�S�jr�g)��)�annotationsN)	�Any�AnyStr�BinaryIO�Dict�Iterable�Literal�Optional�
TYPE_CHECKING�cast�)�_)�hex�nullrev�short)�attr)�	bookmarks�bundle2�	changelog�copies�crecord�encoding�error�exchange�	formatter�
logcmdutil�match�merge�
mergestate�	mergeutil�obsolete�patch�pathutil�phases�pycompat�repair�revlog�rewriteutil�scmutil�state�streamclone�subrepoutil�
templatekw�	templater�util�vfs)�dateutil�
stringutil�urlutil)�	constants)�status)�ui�nsdry-runs)do not perform actions, just print output�sconfirmsask before applying actions�essshsspecify ssh command to usesCMDs	remotecmds,specify hg command to run on the remote sidesinsecures>do not verify server certificate (ignoring web.cacerts config)�Isincludes)include names matching the given patternssPATTERN�Xsexcludes)exclude names matching the given patterns�m�messagesuse text as commit messagesTEXT�l�logfilesread commit message from filesFILE�d�dates(record the specified date as commit datesDATE�u�users&record the specified user as committersUSER�Dscurrentdates&record the current date as commit date�Uscurrentusers$record the current user as committer�Tstemplatesdisplay with templatesTEMPLATEsstyles,display using template map file (DEPRECATED)sSTYLE�pspatchs
show patch�gsgitsuse git extended diff formatslimits!limit number of changes displayedsNUM�Ms	no-mergessdo not show mergessstats(output diffstat-style summary of changes�Gsgraphsshow the revision DAG�astextstreat all files as texts0use git extended diff format (DEFAULT: diff.git)sbinarys+generate binary diffs in git mode (default)snodatessomit dates from diff headers�wsignore-all-spaces'ignore white space when comparing lines�bsignore-space-changes+ignore changes in the amount of white space�Bsignore-blank-liness(ignore changes whose lines are all blank�Zsignore-space-at-eols#ignore changes in whitespace at EOLsnoprefixs&omit a/ and b/ prefixes from filenamess
show-functions>show which function each change is in (DEFAULT: diff.showfunc)sreverses&produce a diff that undoes the changessunifieds"number of lines of context to showsroots&produce diffs relative to subdirectorysDIR�tstoolsspecify merge toolsTOOL�s�
similaritys-guess renamed files by similarity (0<=s<=100)s
SIMILARITY�S�subrepossrecurse into subrepositories�c�	changelogFsopen changelog�manifests
open manifest�dirsopen directory manifests:^HG: ------------------------ >8 ------------------------$c���SSjnSnUHTnURU5(dMU(a0[R"[S5U"U5U"U54-5eUnMV U$)zyabort if more than one of the arguments are in opts

Returns the unique argument or None if none of them were specified.
c�N�[R"U5RSS5$)N�_�-)r%�sysbytes�replace��names �3/usr/lib/python3/dist-packages/mercurial/cmdutil.py�
to_display�)check_at_most_one_arg.<locals>.to_display*s ��� � ��&�.�.�t�T�:�:r8Ns!cannot specify both --%s and --%s)r`r�return�bytes)�getr�
InputErrorr)�opts�argsrb�previous�xs     ra�check_at_most_one_argrl!sh��;��H�
���8�8�A�;�;���&�&��:�;�!�(�+�Z��]�;�<����H���Or8c�.�UHn[XU5 M g)z�abort if the first argument is given along with any of the others

Unlike check_at_most_one_arg(), `others` are not mutually exclusive
among themselves, and they're passed as a single collection.
N)rl)rh�first�others�others    ra�check_incompatible_argumentsrq9s�����d�5�1�r8c��[USS5 [USS5 SnURS5(aS[R"5-US'O\URS5(dFUR	SS5(a/URS5cS[R"5-US'S	nURS5(aUR5US'U$)
z�modify commit options dict to handle related options

The return value indicates that ``rewrite.update-timestamp`` is the reason
the ``date`` option is set.
�date�currentdate�user�currentuserFs%d %d�rewritesupdate-timestampT)rlrfr1�makedate�
configbool�username)r6rh�
datemaydiffers   ra�resolve_commit_optionsr|Gs����$��
�6��$��
�6��M��x�x�
����(�"3�"3�"5�5��V���H�H�V����M�M�*�&9�:�:��H�H�]�#�+��(�"3�"3�"5�5��V���
��x�x�
����{�{�}��V���r8c���URS5nU(dg[U5S:�a[R"[	S55eSU;a[R"[	S55eg)z!make sure note is of valid format�noteN�s*cannot store a note of more than 255 bytes�
snote cannot contain a newline)rf�lenrrgr)rhr~s  ra�check_note_sizer�bs]���8�8�F��D���
�4�y�3�����q�!N�O�P�P���}����q�!A�B�C�C�r8c�X�[R[R4n[	X5$�N)�
crecordmod�uihunkr"�
recordhunk�
isinstance)rk�hunkclassess  ra�ishunkr�os#���$�$�e�&6�&6�7�K��a�%�%r8c�X�[R[R4n[	X5$r�)r��uiheaderr"�headerr�)rk�
headerclassess  ra�isheaderr�ts!���(�(�%�,�,�7�M��a�'�'r8c�F�[5n[5nUH�n[U5(dMUR5(dM,URUR	55 UR[UR
55UR	51-
5 M� X4$r�)�setr��	isnewfile�add�filename�update�files)�chunks�newlyaddedandmodifiedfiles�alsorestore�chunks    ra�newandmodifiedr�ysx��!$����%�K����E�?�?�u���0�0�&�*�*�5�>�>�+;�<����s�5�;�;�=�1�U�^�^�5E�4F�F�G��&�2�2r8c��URS5n[U5n/nUHFnSU;dMURSS5nXR;dM$URU5 UR	U5 MH URU5 U$)N�|r\r8)�splitr�r^r��append�extend)�cmd�base_aliases�all_aliases�
extra_aliases�alias�folded_aliass      ra�parsealiasesr��su���9�9�T�?�L��l�#�K��M����5�=� �=�=��s�3�L��.�����-��$�$�\�2�����
�&��r8c�P^^�SmURmUU4Sjn[USU5 T$)Nc�^�URSS5n[R"U4Sj5HupEU"XCU-S9 M g)N�labelr8c�>�T$r��)ris�ra�<lambda>�8setupwrapcolorwrite.<locals>.wrapwrite.<locals>.<lambda>�s���r8�r�)�popr"�	difflabel)�origri�kwr�r��ls `    ra�	wrapwrite�&setupwrapcolorwrite.<locals>.wrapwrite�s4������w��$������5�H�E���a�i�(�6r8c�>�T"T/UQ70UD6$r�r�)ri�kwargs�oldwriter�s  ��ra�wrap�!setupwrapcolorwrite.<locals>.wrap�s�����3�D�3�F�3�3r8�write)r��setattr)r6r�r�r�s  @@ra�setupwrapcolorwriter��s+���)�
�x�x�H�4��B�����Or8c��U(aTU(a&[R"U[R5nO[Rn[R"XXe5$[R"XXE5$![R
a8nUR
SU-5 UR
[S55 SnAN^SnAff=f)N�%s
sfalling back to text mode
)	r��
testdecorator�testchunkselector�
chunkselector�filterpatch�
fallbackerror�warnrr")r6�
originalhunks�	usecurses�testfiler�	operation�recordfn�es        ra�filterchunksr��s���3���%�3�3��j�:�:���&�3�3���)�)��8��
�����R��A�A��	�#�#�3�
����!���
����0�1�2�2��3�s�AA5�5C�	.B<�<Cc��[R"U5nURSS5n[U5n[	XXEX#5upxX`lXx4$!X`lf=f)z�Prompts the user to filter the originalhunks and return a list of
selected hunks.
*operation* is used for to build ui messages to indicate the user what
kind of filtering they are doing: reverting, committing, shelving, etc.
(see patch.filterpatch).
�experimentalscrecordtest)r��checkcurses�configr�r�r�)	r6r�rr�r�r�r��	newchunks�newoptss	         ra�recordfilterr��s`���&�&�r�*�I��y�y��.�9�H�"�2�&�H��)��y�E�
��	���������s�A
�
Ac	��UR5ceURS5(d
[USS9 USn	[U	R	55S:�n
U
(a[
R"[S55eSnURS5nU(d[R"X;5nURUS	9n
S
S0nURRUS5 [R"[R"U
R 5[R"U
R"5[R"U
R$5[R"U
R&5[R"U
R(5[R"U
R*5[R"U
R,55n[.R0"URX�USS9unnnUH?nUU;dMU	R3U5R5S5n[
R6"U5e SSS5 U(dUR9X�X�5 [:R<"UUSS
SS9nSUlSUl SUl![:RD"XUS9n[:RF"U5n[RH"USU5nU"UUU5unnURQU5 [SU5unn[U5nUH=n[WU5(dMURQ[UURY555 M? U
R U
R"-U
R$-nUV s/sH
n U U;dMU PM n!n U!(dUR[S55 g[UU
R 5n"U(aUn#O U!V s/sHn U U";dU U;dMU PM n#n 0n$U#(a2URZR]S5n%[^R`"U%5 U#H�n [dRf"[^RhRkU 5S-W%S9un&n'[^Rl"U&5 URoSU U'4-5 [pRr"URuU 5U'SS9 U'U$U 'M� [w5n(UH,n)U)Ry5n*U*U$;dMU)R{U(5 M. U(R}5n+U(RS5 URSS5(a�[�R�[�R�-U(R�5-n,UR�U,SSURhS9n-U(R�S5 U(R{U-5 U(RS5 UV)s/sH(n)[^R�"URuU)55PM*  n)U$(aI[R�"U[UU$R�55U-5n.[�R�"USU.S9 U+(aHURoS 5 URoU(R�55 [:R�"XU(SSS!9 A(U!V/s/sHn/URuU/5PM n!n/U"X/U!Q70[dR�"U5D6UR�n0U$R�5H�un1n'URoS"U'U14-5 U0R�U15R�(a,U0R�U5 U0R�U1SSSS#9 SSS5 [pRr"U'URuU15SS9 [^R�"U'5 M� U#(a[^R�"W%5 $$!,(df   GNu=f![
RJa'n[
R"[S5U-5eSnAf[
RLa'n[
RN"[S5U-5eSnAff=fs sn fs sn f![ba GN%f=fs sn)f![
RJa/n[
R"[dR�"U55eSnAf[
RLa/n[
RN"[dR�"U55eSnAff=fs sn/f!,(df   GN�=f![�a $f=f!UR�n0U$R�5H�un1n'URoS"U'U14-5 U0R�U15R�(a>U0R�U5 U0R�U1SSSS#9 SSS5 O!,(df   O=f[pRr"U'URuU15SS9 [^R�"U'5 M� U#(a[^R�"W%5 ff![�a ff=f=f)$a�This is generic record driver.

Its job is to interactively filter local changes, and
accordingly prepare working directory into a state in which the
job can be delegated to a non-interactive commit command such as
'commit' or 'qrefresh'.

After the actual job is done by non-interactive command, the
working directory is restored to its original state.

In the end we'll record interesting changes, and everything else
will be left in place, so the user can continue working.
Nsinteractive-unshelveT)�commitr
s9cannot partially commit a merge (use "hg commit" instead)c�6�[R"SX4-5e)Ns%s: %s)rrg)�f�msgs  ra�fail�_record.<locals>.fail�s�����y�A�8�3�4�4r8�force�r)�uiscommitsubrepossrecord)�force�commandsscommit.interactive.)rh�
whitespace�section�configprefix)�changesrh�error parsing patch: %s�error applying patch: %ssno changes to record
rsrecord-backups�.)�prefix�dirsbackup %r as %r
��copystatsreviewFr8sdiff)�action�repopath)�matchersapplying patch
��eolmodesrestoring %r to %r
��
p1_tracked�
wc_tracked�possibly_dirty)W�currentwlockrf�checkunfinishedr��parentsrrgr�matchmod�badmatchr5r6�configoverrider)�copymod�copy�modified�added�removed�deleted�unknown�ignored�cleanr,�	precommit�sub�dirtyreason�Abort�checkcommitpatternsr"�difffeatureopts�nodates�git�showfunc�diff�
parsepatchr�PatchParseError�PatchApplicationError�
StateErrorr�r�r�r�r�r0�join�os�mkdir�FileExistsErrorr%�mkstemp�path�basename�close�debugr/�copyfile�wjoin�stringior�r��tell�seekr��diffhelptext�
patchhelptext�read�edit�truncate�unlink�
matchfiles�keys�mergemod�	revert_to�getvalue�
internalpatch�bytestr�	strkwargs�dirstate�items�	get_entry�maybe_clean�changing_parents�update_file�rmdir�OSError)2r6�repo�messagerrh�
commitfunc�	backupall�filterfn�pats�wctxrr�r�r5�	overrides�	tmpstatus�subs�
commitsubs�newstate�sr�diffopts�originaldiff�original_headersr�r��errr�r��
contenders�h�changedr��newfilesr��tobackup�backups�	backupdir�fd�tmpname�fp�c�fname�dopatch�	patchtext�
reviewedpatch�m�nfr.�realnames2                                                  ra�_recordrY�s$��0����*�*�*��8�8�+�,�,���T�*���:�D�������!�#�E�����
�N�O�
�	
�5�
�H�H�X��E���!�!�%�.��
�[�[�u�[�
%�F�+�T�2�I�	
���	�	�	�9�	5��N�N��L�L����)��L�L����&��L�L����(��L�L����(��L�L����(��L�L����(��L�L����&�
�	�&1�%:�%:��G�G�T�e�4�&
�"��j�(��A��J��"�h�h�q�k�5�5�d�;���k�k�+�.�.��!
6�*�� � ��f�;��$�$�
�
���+��H��H���H�L��H���:�:�d��B�L��'�'��5���M�M�$�t�*�d�+�E�E�"�2�'7��?����
	�K�K���/=�V�.D�+�����J�
���A�;�;����c�!�'�'�)�n�-���o�o����,�v�~�~�=�G�"�6�7�a�a�:�o��7�H�6��
�	�	�!�-�.�/���6�?�?�#�H�����
����H�}��%?� ?�
��	�
�
�G���H�H�M�M�"3�4�	�	��H�H�Y��[��A�"�*�*��w�w�'�'��*�T�1�y��K�B��
�H�H�R�L��H�H�)�Q��L�8�9��M�M�$�*�*�Q�-��4�@� �G�A�J���Z���A��J�J�L�E�����������'�'�)��
����
��8�8�I�u�%�%��'�'�*�*B�*B�B�R�W�W�Y�N�
��G�G��3�w����$��M�
�K�K��N��H�H�]�#��G�G�A�J�+E�F�+E�a����4�:�:�a�=�	!�+E�F���"�"�4��W�\�\�^�)<�{�)J�K�A����t�D�z�1�5��
>����,�-��������'��#�#�B�b�!�T�B�

�.6�6�X�r�D�J�J�r�N�X��6��"�J�X�J��1C�1C�D�1I�J�!	��}�}�H�%,�]�]�_�!��'����0�G�X�3F�F�G��%�%�h�/�;�;�"�2�2�4�8� �,�,�$�'+�'+�+/�	-��9��
�
�g�t�z�z�(�';�d�K��	�	�'�"�7&5�8�����#��U
6�	5��P� � �D����q�!;�<�s�B�C�C���&�&�E����q�!<�=��C�D�D��E�� 7��
���	��	��B	G���(�(�
>��&�&�x�'7�'7��'<�=�=���.�.�
>��&�&�x�'7�'7��'<�=�=��
>��7�&9�8��"�	��	��A!	��}�}�H�%,�]�]�_�!��'����0�G�X�3F�F�G��%�%�h�/�;�;�"�2�2�4�8� �,�,�$�'+�'+�+/�	-��9�8�8���
�
�g�t�z�z�(�';�d�K��	�	�'�"�7&5�8�����#����	��	�s/�D^"�<8^"�
^4�+
`+�9`+�`0�`0�`5�B:c9�Cc9�./a�Ac9�7Aa�>c9�c�!c9�A)c)�)c�<A$c)�"
^1�4`(�"_*�*`(�"`#�#`(�5
a�a�c9�c�*b	�	c� *c
�
c�c9�
c&�!c)�)
c6�5c6�9g?�;A)g/�$f	�7	g/�
f
�
A#g/�-g?�/
g<�9g?�;g<�<g?c�d�[R"U5nUR5(d7U(a[S5U-nO[S5n[R
"U5eUR
S5(dUR5 [R"[UUUUS9n	[XX�U5$)Ns)running non-interactively, use %s insteadsrunning non-interactivelyrC)r8r9r:r;)r%�byteskwargs�interactiverrrgrfrz�	functools�partialrYr�)
r6r6r8�
cmdsuggestr9r:r;rhr��funcs
          ra�dorecordra�s�������%�D�
�>�>�����@�A�J�N�C��0�1�C����s�#�#��8�8�G���
���
��������
��D��"�D��-�-r8c�6�\rSrSrSrSrSrSrSrSr	Sr
g	)
�dirnodei�a�
Represent a directory in user working copy with information required for
the purpose of tersing its status.

path is the path to the directory, without a trailing '/'

statuses is a set of statuses of all files in this directory (this includes
all the files in all the subdirectories too)

files is a list of files which are direct child of this directory

subdirs is a dictionary of sub-directory name as the key and it's own
dirnode object as the value
c�J�Xl[5Ul/Ul0Ulgr�)rr��statusesr��subdirs)�self�dirpaths  ra�__init__�dirnode.__init__�s���	����
���
���r8c�<�URRX45 g)z/Add a file in this directory as a direct child.N)r�r�)rgr�r5s   ra�
_addfileindir�dirnode._addfileindir�s���
�
���8�,�-r8c�~�SU;a{URSS5up4X0R;a9[R"URU5n[U5URU'URUR
XB5 OURX5 X R;aURRU5 gg)z�
Add a file to this directory or to its direct parent directory.

If the file is not direct child of this directory, we traverse to the
directory of which this file is a direct child of and add the file
there.
�/r
N)
r�rfr#rrrc�addfilerlrer�)rgr�r5�subdir�filep�
subdirpaths      rarp�dirnode.addfile�s����8��$�N�N�4��3�M�F��\�\�)�%�]�]�4�9�9�f�=�
�'.�z�':����V�$�
�L�L�� �(�(��7�
���x�0����&��M�M���f�%�'r8c#�# �URH*upU[R"URU54v� M, g7f)z=Yield (status, path) for files directly under this directory.N)r�r#rr)rgr��sts   ra�
iterfilepaths�dirnode.iterfilepaths�s/����Z�Z�E�A��h�m�m�D�I�I�q�1�1�1� �s�<>c#�N# �[UR5S:Xa2URR5nX!;aX RS-4v� gUR	5Shv�N UR
R
5HnURU5Shv�N M gN?N7f)a�
Yield (status, path) obtained by processing the status of this
dirnode.

terseargs is the string of arguments passed by the user with `--terse`
flag.

Following are the cases which can happen:

1) All the files in the directory (including all the files in its
subdirectories) share the same status and the user has asked us to terse
that status. -> yield (status, dirpath).  dirpath will end in '/'.

2) Otherwise, we do following:

        a) Yield (status, filepath)  for all the files which are in this
            directory (only the ones in this directory, not the subdirs)

        b) Recurse the function on all the subdirectories of this
           directory
r
roN)r�rer�rrwrf�values�	tersewalk)rg�	terseargs�onlyst�dirobjs    rar{�dirnode.tersewalk�s����.�t�}�}���"��]�]�&�&�(�F��"��i�i�$�.�.�.���%�%�'�'�'��l�l�)�)�+�F��'�'�	�2�2�2�,�	(�
3�s$�AB%�!B!�"5B%�B#�
B%�#B%)r�rrerfN)�__name__�
__module__�__qualname__�__firstlineno__�__doc__rirlrprwr{�__static_attributes__r�r8rarcrc�s ��
��.�&�82�
%3r8rcc��Sn[R"U5H*nX2;dM
[R"[	S5U-5e [S5nSn0nUH,upx[
X5Hn	URX�5 M /Xh'M. UR5Hup�XjRU5 M URR5H0nURU5Hup�XjRU	5 M M2 /n
UH(n
XjR5 U
RXj5 M* [R"U
6$)a�
Terse the status if all the files in a directory shares the same status.

statuslist is scmutil.status() object which contains a list of files for
each status.
terseargs is string which is passed by the user as the argument to `--terse`
flag.

The function makes a tree of objects of dirnode class, and at each node it
stores the information required to know whether we can terse a certain
directory or not.
)r<rK�rr@rB�irUs'%s' not recognizedr8))r�r<)r�rK)rr@)rrU)rrB)rr�)r�r�)r%r,rrgrrc�getattrrprwr�rfrzr{�sortr)r5)�
statuslistr|�allstrB�rootobj�pstatus�	tersedict�attrname�
statuscharr�rv�fpathrq�
tersedlists              ra�tersedirr�"s1��
7�E��
�
�i�
(���>��"�"�1�%;�#<�q�#@�A�A�)�
�c�l�G��G��I� '�����.�A��O�O�A�*�/� "�	��!(��*�*�,�	���
���U�#�-��/�/�(�(�*���%�%�i�0�E�B��M� � ��#�1�+��J����
�������)�-�(���>�>�:�&�&r8c�~�UR5nUVs/sHnSU-PM
 nnSRU5S-$s snf)z0Surround lineswith a comment char and a new lines# %sr�)�
splitlinesr)�raw�lines�line�commentedliness    ra�
_commentlinesr�Zs?���N�N��E�16�7���g��n��N�7��:�:�n�%��-�-��8s�:T)�frozenc��\rSrSr\R
"5r\R
"5r\R
"5r\R
"5r	\R
"5r
\R
"S\"5S9rSr
SrSrSrSrg	)
�
morestatusiaF)�init�defaultsstatus.morestatusc��URRU5 UR(a XR;aUR	SS9 ggg)NT)�
unresolved)�_formattedpathsr��activemerge�unresolvedpaths�data)rgr�fms   ra�
formatfile�morestatus.formatfileks@����� � ��&�����(<�(<� <��G�G�t�G�$�!=�r8c�P�UR(dUR(aUR5 URSS9 UR(aWURURS9 [	S5UR-nURS[
U5-URS9 UR(aURURS9 URU5 UR(a1URS[
UR5-URS9 gg)Ns
morestatus)�itemtype)�
unfinisheds.The repository is in an unfinished *%s* state.r�r�)�
unfinishedmsg)	�unfinishedopr��	startitemr�r�plainr��_label�_formatconflicts)rgr��statemsgs   ra�formatfooter�morestatus.formatfooterps������� 2� 2��L�L�N��G�G�]�G�+�����G�G�t�0�0�G�1��C�D��#�#�$�
�
�H�H�W�}�X�6�6�d�k�k�H�J�����G�G�$�"4�"4�G�5�	
���b�!�����H�H��-��(:�(:�;�;�4�;�;�
�
�r8c�h�UR(dgUR(a�SRURVs/sHEnS[R"UR
R[R"5U5-PMG sn5n[S5U-nURHNnXPR;aMUR5 URUR
S9 URSUSS9 MP O[S5nURS	[U5-UR S
9 gs snf)Nr�s    %ssSUnresolved merge conflicts:

%s

To mark files as resolved:  hg resolve --mark FILE)r6sfileT)r�rr�sNo unresolved merge conflicts.r�r�)r�r�rr/�pathtor6�rootr�getcwdrr�r��contextr�r�r�r�)rgr�r�mergeliststrr�r�s      rar��morestatus._formatconflicts�s��������� �:�:�!%� 4� 4��!5����k�k�$�)�)�.�.�(�/�/�2C�T�J�K� 4���L��6����
��)�)���,�,�,�������
�
��	�	�
�*�����q�T��B�*��5�6�C�
����=��-�-�T�[�[��A��Cs�AD/r�N)r�r�r�r�r�ibr6r�r�r�r�r�r�r�r�r�r�r�r�r8rar�r�as`���7�7�9�D��7�7�9�L��G�G�I�M��'�'�)�K��g�g�i�O��g�g�5�#�%�8�O�
!�F�%�
�.'Br8r�c�$�[R"U5n[RR	U5nUR5nU(dU(dgS=n=pVU(aUupEU(a[
UR55n[XXSU5$)z=Returns a morestatus object if the repo has unfinished state.N)	�statemod�getrepostate�
mergestatemodrr"�active�sortedr�r�)r6�
statetuplerr�r�r�r�s       ra�readmorestatusr��s����&�&�t�,�J��)�)�.�.�t�4�J��#�#�%�K��k��04�4�L�4�=��&0�#����J�1�1�3�4�
���M�
��r8c��0n0nX;aU/nOUR5n/nUH�n[U5nURU5 Sn	X;aUn	O*U(d#UHn
U
RU5(dMU
n	 O U	cMXUSRS5(dU	RS5(a
X�U4XI'M�X�U4X9'M� U(d	U(aUnX64$)z�
Return cmd -> (aliases, command table entry)
for each matching command.
Return debug commands (or their aliases) only if no normal command matches.
Nrsdebug)r'r�r��
startswith)r��table�strict�choice�debugchoicer'�allcmdsr��aliases�found�as           ra�findpossibler��s����F��K�
�|��u���z�z�|���G�
���q�/�����w�����>��E�����<�<��$�$��E������q�z�$�$�X�.�.�%�2B�2B�8�2L�2L�&-�Q�x�%8��"�!(��(� 3��
��"�k����?�r8c��[XU5up4X;aX0$[U5S:�a![U5n[R"X5eU(a[UR
55S$[R"X5e)z9Return (aliases, command table entry) for command string.r
r)r�r�r�r�AmbiguousCommand�listrz�UnknownCommand)r�r�r�r�r��clists      ra�findcmdr��sl��"�3�v�6�O�F�
�}��{��
�6�{�Q���v����$�$�S�0�0�
��F�M�M�O�$�Q�'�'�
�
�
�s�
,�,r8c�^�UR5 UR5 URS5 [U5 [R
"X5nU(d[R"S5eURSU5n[U5S:�a[R"[S55e[R"XS5 XR5nUR5Vs1sHowR5iM nnUR!S5(d7X8;a2X1R#5;a[R"[S55eURS	U5(a[R"[S
55e0n	SSKJn
 UGHgnXmTR5nX�:XaMU4Sjn
UR)S
[+TR-55X�4-5 TR/5n[+TR-55US'TR15R-5nTR35R-5nX�;aX�SnUU	;aU	USnU
R5UUU4TR75TR95U
TR;5TR=5UUS9	nUR?U5nU4U	TR-5'UR)S[+U5-5 GMj [@RB"XSSS9 USn[UR55S:XaJU	R!UR15R-55nUbSSKJ"n URGUUSSS9 URI[S5[U	5-5 SSS5 SSS5 SSS5 gs snf!,(df   N$=f!,(df   N-=f!,(df   g=f)z-Change the branch name of given revs to labelsbranchessempty revision set�
roots(%ld)r
s,cannot change branch of non-linear revisionsschange branch ofr�s(a branch of the same name already existssheads(%ld) - head()s)cannot change branch in middle of a stack�r�c�D>�TU$![Ra gf=fr�)r�ManifestLookupError)r6�newctxr�ctxs   �ra�	filectxfn�changebranch.<locals>.filectxfn(s*��� ��t�9�$���0�0� �� �s���s*changing branch of '%s' from '%s' to '%s'
s
branch_changer)rurs�extra�branchsnew node id is %s
s
branch-changeT��fixphaseN��hg)�
quietemptys changed branch on %d changesets
)%�wlock�lock�transaction�
bailifchangedr�revrangerrg�revsr�rr(�precheckrnr�r�rf�	branchmap�r�rr�noder��p1�p2�memctx�descriptionr�rurs�	commitctxr)�cleanupnodesr�r�r5)r6r6r�r�rh�rootsr��parent�rpb�replacementsr��rev�	oldbranchr�r�r�r��mc�newnoder<�newidr�r�s                      @ra�changebranchr�s=���
����t�y�y�{�D�$4�$4�[�$A��d���"�"�4�.����"�"�#8�9�9��	�	�-��.���u�:��>��"�"��A�B��
�	���T�)<�=��K�K�M�"��-1�\�\�^�<�^�6�}�}��^��<�����!�!�� ����)�)��"�"��=�>��
�
�9�9�+�T�2�2��"�"��>�?��
���	��C��)�C��
�
��I��!��
 �
�H�H�>��s�x�x�z�?�I�5�6�
��I�I�K�E�&)�#�(�(�*�o�E�"�#��������B��������B��!�!�%�a�(���\�!�!�"�%�a�(�������R�����!��	�	����X�X�Z��X�X�Z��� �
�B��n�n�R�(�G�(/�z�L�����$��H�H�+�c�'�l�:�;�W�\	���� 0�4�	
�
�D�z���t�|�|�~��!�#� �$�$�T�W�W�Y�^�^�%5�6�E�� �!��	�	�$��a��T�	�:�
�	�	�!�8�9�C��<M�M�N�C%B�{����=�%B�$A��{�{����sM�O+�O�B:O	�/O
�J#O	�+O�3O+�O	�	
O�O�
O(	�$O+�+
O9c�^�[RR[RRUS55(djU[RR	U5pX:Xag[RR[RRUS55(dMjU$)Ns.hg)rr�isdirr�dirname)�p�oldps  ra�findreporbsk���g�g�m�m�B�G�G�L�L��F�3�4�4��R�W�W�_�_�Q�'�a��9���g�g�m�m�B�G�G�L�L��F�3�4�4�

�Hr8c��U(aFURR5UR:wa[R"[S5US9eUR
5nUR(d3UR(d"UR(dUR(a[R"[S5US9eUSn[UR5H!nURU5RUS9 M# g)z�enforce the precondition that working directory must be clean.

'merge' can be set to false if a pending uncommitted merge should be
ignored (such as when 'update --check' runs).

'hint' is the usual hint given to Abort exception.
soutstanding uncommitted merge��hintsuncommitted changesN)r.r��nullidrrrr5r�r�r�rr��substaterr�)r6rr	rvr�rBs      rar�r�ks���
����!�!�#�t�{�{�2����q�!A�B��N�N�	
����B�	�{�{�b�h�h�"�*�*��
�
����q�!7�8�t�D�D�
�t�*�C�
�C�L�L�
!������
� � �d� �+�"r8c��[USS5 [[[UR	S55nUR	S5nU(djU(ac[U5(aURR5nU$SR[R"U5R55nU$U$![aGn[R"[S5U[ R""UR$54-5eSnAff=f)z1get the log message according to -m and -l optionr=r?r�s"can't read commit message '%s': %sN)rlrr
rerf�isstdiofilename�finr"rr/�readfiler�r5rrrr�
strtolocal�strerror)r6rhr7�logfile�insts     ra�
logmessager~s����$�
�J�7��8�E�?�D�H�H�Z�$8�9�G��h�h�z�"�G��w�		��w�'�'��&�&�+�+�-���N�
 �*�*�T�]�]�7�%;�%F�%F�%H�I���N�7�N���	��+�+��7�8��H�/�/��
�
�>�?�@��
��	�s�*B8�3B8�8
D	�AD�D	c��[U[5(aU(aUS-$US-$[UR55S:�aUS-$US-$)areturn appropriate editform name (referencing a committemplate)

'ctxorbool' is either a ctx to be committed, or a bool indicating whether
merging is committed.

This returns baseformname with '.merge' appended if it is a merge,
otherwise '.normal' is appended.
s.merger
s.normal)r��boolr�r�)�	ctxorbool�baseformnames  ra�
mergeeditformr�s_���)�T�"�"���)�+�+��
�*�$�$�

�Y�
�
�
 �	!�A�	%��i�'�'��*�$�$r8c�h^^^�U(dT(dT(aUUU4Sj$T(aU4Sj$[$)a�get appropriate commit message editor according to '--edit' option

'finishdesc' is a function to be called with edited commit message
(= 'description' of the new changeset) just after editing, but
before checking empty-ness. It should return actual text to be
stored into history. This allows to change description before
storing.

'extramsg' is a extra message to be shown in the editor instead of
'Leave message empty to abort commit' line. 'HG: ' prefix and EOL
is automatically added.

'editform' is a dot-separated list of names, to distinguish
the purpose of commit text editing.

'getcommiteditor' returns 'commitforceeditor' regardless of
'edit', if one of 'finishdesc' or 'extramsg' is specified, because
they are specific for usage in MQ.
c	�>�[XUTTTS9$)N)�
finishdesc�extramsg�editform)�commitforceeditor)�rrQrBrrrs   ���rar��!getcommiteditor.<locals>.<lambda>�s���0�
�!�
�X�� 
r8c�>�[XUTS9$)N�r��commiteditor)r rQrBrs   �rar�r!�s���|�A�!�h�Gr8r$)r#rrrrhs ``` ra�getcommiteditorr&�s'���,�z�X�
�	
�
�G�G��r8c���/n[R"USS9HHup#nUS:Xa)UR[R"XU55 M5URXU5 MJ SRU5$)NT�r��stringr8)r.�scantemplater�r2�	escapestrr)�tmpl�parts�typ�start�ends     ra�_escapecommandtemplater1�sf���E�$�1�1�$�D�A���C��)���L�L��-�-�d��o�>�?��L�L��C��)�	B�
�8�8�E�?�r8c�v�U(dU$[R"U[U55nURU5$)a|Expand a literal template 'tmpl' in a way suitable for command line

'\' in outermost string is not taken as an escape character because it
is a directory separator on Windows.

>>> from . import ui as uimod
>>> ui = uimod.ui()
>>> rendercommandtemplate(ui, b'c:\\{path}', {b'path': b'foo'})
'c:\\foo'
>>> rendercommandtemplate(ui, b'{"c:\\{path}"}', {'path': b'foo'})
'c:{path}'
)r�
maketemplaterr1�
renderdefault)r6r,�props�ts    ra�rendercommandtemplater7�s3���������$:�4�$@�A�A��?�?�5�!�!r8c��UR5n[R"URU5n[R"URU[
RUS9nSU0nU(aURU5 URU5$)z�Expand a literal template 'tmpl' byte-string against one changeset

Each props item must be a stringify-able value or a callable returning
such value, i.e. no bare list nor dict should be passed.
)�defaults�	resourcessctx)	r6r�templateresourcesr6r3r-�keywordsr�r4)r�r,r5r6�tresr6�mappings       ra�rendertemplater?�sq���8�8�:�D��&�&�t�w�w��5�D��������
� 3� 3�t�	�A��s�m�G�����u���?�?�7�#�#r8c���SnU(aURSSU-S5nU(dURSS5nU(dUnU(dSn[X5nURS5S$)z&Format a changeset summary (one line).Nscommand-templatessoneline-summary.%ssoneline-summarys{separate(" ", label("oneline-summary.changeset", "{rev}:{node|short}"), join(filter(namespaces % "{ifeq(namespace, "branches", "", join(names % "{label("oneline-summary.{namespace}", name)}", " "))}"), " "))} "{label("oneline-summary.desc", desc|firstline)}"r�r)r�r?r�)r6r��command�default_spec�spec�texts      ra�format_changeset_summaryrE�sr���D���y�y� �"7�'�"A�4�
����y�y�-�/A�B������
A�	
��#�$�D��:�:�e��Q��r8c���SSSSSSSS.nUbS	US
'UbSUS'UbUbS
US'UbSUS'SUS'SUS'/n[R"USS9H�upxn	US:waURXU	5 M!Un
X�:dM*URSX�5nUS:a)UR[R
"X
U	55 MkUR[R
"X
U55 US-U	:�a[R"[S55eXS-US-nUS-n
URX\5 X�:aM�M� SRU5$![a# [R"[S5U-5ef=f)a�Convert old-style filename format string to template string

>>> _buildfntemplate(b'foo-%b-%n.patch', seqno=0)
'foo-{reporoot|basename}-{seqno}.patch'
>>> _buildfntemplate(b'%R{tags % "{tag}"}%H')
'{rev}{tags % "{tag}"}{node}'

'\' in outermost strings has to be escaped because it is a directory
separator on Windows:

>>> _buildfntemplate(b'c:\\tmp\\%R\\%n.patch', seqno=0)
'c:\\\\tmp\\\\{rev}\\\\{seqno}.patch'
>>> _buildfntemplate(b'\\\\foo\\bar.patch')
'\\\\\\\\foo\\\\bar.patch'
>>> _buildfntemplate(b'\\{tags % "{tag}"}')
'\\\\{tags % "{tag}"}'

but inner strings follow the template rules (i.e. '\' is taken as an
escape character):

>>> _buildfntemplate(br'{"c:\tmp"}', seqno=0)
'{"c:\\tmp"}'
s{node}s{rev}s{node|short}s${sub(r"[^\w]", "_", desc|firstline)}s7{if(revwidth, pad(rev, revwidth, "0", left=True), rev)}�%s{reporoot|basename})�H�R�hr<r�rGrMs{total}�Ns{seqno}r7s3{pad(seqno, total|stringify|count, "0", left=True)}s{pathname|basename}rQs-{if(pathname|dirname, pathname|dirname, ".")}r@s
{pathname}rGTr(r)r�s)incomplete format spec in output filenamer
s-invalid format spec '%%%s' in output filenamer8)r.r*r��findr2r+rrr�KeyErrorr)
�pat�total�seqno�revwidth�pathname�expander�newnamer.r/r0�i�nrQs
             ra�_buildfntemplaterXs���2���6�H��$��H�
��#������#������U�.�O������/����I����&�����G�$�1�1�#�4�@���C��)���N�N�3�S�>�*�����g�����q�&�A��1�u����z�3�3�C�#�J�?�@���N�N�:�/�/��a��9�:��1�u�s�{��k�k��B�C�����E�A��E�"�A��A��A�
����x�{�+��g�A�.�8�8�G����	�
��k�k��F�G�!�K���
�s�E�-E5c�l�U(dU$[U40UD6n[X[R"U55$r�)rXr?r%r[)r�rOr5r,s    ra�makefilenamerZSs3����
��C�)�5�)�D��#�X�%9�%9�%�%@�A�Ar8c�(�U(+=(d US:H$)zATrue if the given pat looks like a filename denoting stdin/stdoutr\r�)rOs rar
r
]s���7�!�c�T�k�!r8c�<�\rSrSrS
SjrSrSrSrSrSr	Sr
g	)�_unclosablefileibc��Xlgr���_fp)rgrPs  rari�_unclosablefile.__init__cs���r8c��gr�r��rgs rar�_unclosablefile.closef���r8c�,�[UR5$r�)�iterr`rcs ra�__iter__�_unclosablefile.__iter__is���D�H�H�~�r8c�.�[URU5$r�)r�r`)rgrs  ra�__getattr__�_unclosablefile.__getattr__ls���t�x�x��&�&r8c��U$r�r�rcs ra�	__enter__�_unclosablefile.__enter__os���r8c��gr�r�)rg�exc_type�	exc_value�exc_tbs    ra�__exit__�_unclosablefile.__exit__rrer8r_N)rPrrd�None)r�r�r�r�rirrhrkrnrtr�r�r8rar]r]bs ���
��'��
r8r]c�*�US;n[U5(ahUR5nU(aURRnOURRn[
R"[[U55$[X40UD6n[Xr5$)N)r �rb)r
r6r6�foutr�typingrrr]rZ�open)r�rO�moder5�writabler6rP�fns        ra�makefileobjrvsp���;�&�H��s����x�x�z��������B������B��{�{�8�_�R�%8�9�9�	�c�	(�%�	(�B���>�r8c���USnUSnUSnSnU(aU(a[S5nOTU(aU(a[S5nO:U(dU(dU(a%U(a[S5nOU(d[S5nU(a[R"U5eSn	U(GacU(aUR5Rn	O�U(a�[
R"U5(d[R"[S	55eURS
5(dUS
-nURRU5n
[U
5(aU
n	OMU(aURRS5n	O*U(a#URU5n[U5(aUn	U(ac[U	[R5(aOC[U	S5(a
U	Rn	O%U	b"[R"[S
5U	-5eU	(d�U(d[R"[S55eU(d [R "U[S55e["R$R'U5(d"[R"[S5U-5e[(R*SU-4n[R"[,R."[0R2"5SS9UUSSS9n	U	$)z:opens the changelog, manifest, a filelog or a given revlogrVrWrXNs:cannot specify --changelog and --manifest at the same times5cannot specify --changelog and --dir at the same times6cannot specify filename with --changelog or --manifestsFcannot specify --changelog or --manifest or --dir without a repositorys9--dir can only be used on repos with treemanifest enabledror8�_revlogs!%r does not appear to be a revlogscannot give path to non-revlogsinvalid argumentssrevlog '%s' not foundsfree-form:%sF)�audit���)�target�radix)rrrg�
unfilteredrr)�istreemanifest�endswith�manifestlog�
getstorager��filer�r'�hasattrr��CommandErrorrr�isfile�revlog_constants�
KIND_OTHER�vfsmodr0rr�)
r6r��file_rh�returnrevlog�cl�mfr�r�r �dirlog�filelogr�s
             ra�openstorager��sS��	
�l�	�B�	
�k�	�B�
�v�,�C�
�C�	�b��M�N��	���H�I��	�r�S���M�N�C���(��C�����s�#�#��A��
����!�+�+�A�
��)�)�$�/�/��&�&��0�����<�<��%�%��D�j���%�%�0�0��5�F��6�{�{����
�� � �+�+�C�0�A�
��i�i��&�G��7�|�|�����!�V�]�]�+�+����I�&�&��I�I�����&�&��:�;�a�?���
���"�"�1�%F�#G�H�H���$�$�S�!�,@�*A�B�B��w�w�~�~�e�$�$��"�"�1�%=�#>��#F�G�G�"�-�-���/F�G���M�M��J�J�x���(��6�����*�
��

�Hr8c��[XX#SS9$)aXObtain a revlog backing storage of an item.

This is similar to ``openstorage()`` except it always returns a revlog.

In most cases, a caller cares about the main storage object - not the
revlog backing it. Therefore, this function should only be used by code
that needs to examine low-level revlog implementation details. e.g. debug
commands.
T)r�)r�)r6r�r�rhs    ra�
openrevlogr��s���t�%�D�A�Ar8c
�8^^^^^!^"^#^$^%^&^'^(�[TSS/5 TR5m#0m'TRS5nTRS5m!TRS5m%TRS5nU(a�U(d&T!(d[R"[S55e[R"TU5m"[T"R55S:�a[R"[S55eOTSm"T"R5m&[R"TSS	9m(U(GanT"R5cT"nO�[T"R55S:�a[R"[S
55eSSKJn [ R""TT"R5/S5 UR%T5nUR'T"R55 [(R*"TT"US
9 [R,"T"UT5n	T"R/5n
U
R1T"R355 [R"T5m(T"R5U	5HXnX�;aX{R7S5 MU	R9U5(dM5TR;[S5T("U5-5 MZ T"R5b�TR=5 UR?T"5nURA5n
TRBR5T"RE5:Xa>TRBRGT5 [RH"TTU
5 SSS5 T"RE5U
/0n[RJ"TUSSS9 SSS5 gg[RL"U5nU(d[R"[S55e[U5S:Xa[R"[S55eURO5nU!U"UU&UU(4SjnT"R5Gbu[ R""TT"R5/S5 [PRR"TRTT#U5nT"RWU5(a([R"[S5T("U5-5eUT";a*[R"[S5T("U5T"4-5eSSKJn /nUH2nU"U5nU(dMUHunnnURYU5 M M4 U(d[R"[S55e[U5S:wa[R"[S55eUR%T5nUR'T"R55 [(R*"TT"US
9 UR7UUS5 TR=5 UR?T"5nURA5n
TRBR5T"RE5:Xa>TRBRGT5 [RH"TTU
5 SSS5 T"RE5U
/0n[RJ"TUSSS9 SSS5 gU!U"U#U%UU&UUU'U4
SjnU#U$U4SjnU#U$U4Sjn[ZR\R_U5=(a$ [ZR\RaU5(+m$T$(d�[U5S:�d[bRd"US5(a[R"[S55e[fRh"U5(a"[R"[S5U-5eUnT!(aUn/nUH/nU"U5nU(dMURYU"UUU5U45 M1 U(d2SnT(a[S5n[R"[S5US9eSnUH0unnUH$unn nU"UU U"U5U5(dMUS-
nM& M2 US:g$!,(df   GN=f!,(df   g=f!,(df   GN=f!,(df   g=f) N�forget�dry_runsaftersat_revs--at-rev requires --afterr
s'cannot mark/unmark copy in merge commitT��legacyrelativevalues"cannot unmark copy in merge commitr�suncopy)r<s9%s: not unmarking as copy - file is not marked as copied
r�s"no source or destination specifiedsno destination specifiedc�>�/nTR5cTOT
n[R"X /T	SS9nURU5H�nT"U5nUR	U5nUT;aZUT
;a.T(d&U(aTR[
S5U-5 MUO&U(aTR[
S5U-5 M|URXEU45 M� U$)NT)�globbeds2%s: not copying - file has been marked for remove
s&%s: not copying - file is not managed
)r�r)r�walk�exactr�rr�)
rO�srcs�ctx_to_walkrV�abs�relr��afterr�rh�pctxr6�uipathfns
       ������ra�walkpat�copy.<locals>.walkpat1s������!�W�W�Y�.�c�D���M�M�+�u�d�D�A���#�#�A�&�C��3�-�C��G�G�C�L�E��#�~��$�;� � ��G�G� !�%4�!"�#&�	!&��!�!������H�I�C�O���
�K�K��5�)�*�1'�2�r8s8%s: --at-rev does not support a directory as destinations)%s: copy destination does not exist in %ssno files to copys!--at-rev requires a single sourcerscopyc
�>
^^�[R"TRTU5mST;a5TRSS5upETRRU5S-U-mTR
TT5nTRT5nTRT5nTRRT5n	U	R=(a U	R(+n
[R"T!T5 T RT5nUbAT!R[S5UTR
TT5TR
UT54-5 g[ R"R%U5nSn
U(agTT:waaTRRT5TRRT5:Xa)T(dT!R[S5U-5 gSnSn
T(dU(dT(a�U
(a�TS(d�U
(a�[S5nTT;=(a$ ['UU4S	jTR)555nU(aT(a[S
5nOf[S5nOZT(aSnOS
nT(a[S5U-nO8[S5U-nO)[S5nT(a[S5nO[S5nT!RX�-5 T!RU5 gT(aMU(dET(aT!R[S5X4-5 gT!R[S5X4-5 gO�T(d�U(a[ R*"U5 [ R"R-U5=(d Sn[ R"R/U5(d[ R0"U5 U
(a4US-n[ R2"UU5 [ R2"UU5 O[4R6"X�TS9 SnT!RD(dU(dDT(aT!RG[S5X4-5 OT!RG[S5X4-5 TT T'[RH"T!TTTTTTS9 T(afT(d^T(dDW(a=U
(d6TRJRMSS5nTRNRQTUS9 TRST/5 ggg![8a�nUR:[:R<:Xa%T!R[S5U-5 SnSnAGN6T!R[S5U[>R@"URB54-5 SnAgSnAff=f) Nror
s*%s: not overwriting - %s collides with %s
TFs%s: can't copy - same file
r�s-%s: not overwriting - file already committed
c3�F># �UHnTU;=(a TU;v� M g7fr�r�)�.0�gpctx�abssrc�	abstargets  ��ra�	<genexpr>�)copy.<locals>.copyfile.<locals>.<genexpr>�s*����H�%3�E��%��B�I�U�,B�B�%3�s�!sP('hg rename --at-rev .' to record the rename in the parent of the working copy)
sL('hg copy --at-rev .' to record the copy in the parent of the working copy)
s--after --forces--forces;('hg rename %s' to replace the file by recording a rename)
s7('hg copy %s' to replace the file by recording a copy)
s"%s: not overwriting - file exists
s+('hg rename --after' to record the rename)
s'('hg copy --after' to record the copy)
s+%s: not recording move - %s does not exist
s+%s: not recording copy - %s does not exist
r�s	~hgrenamer�s!%s: deleted in working directory
s%s: cannot copy - %s
smoving %s to %s
scopying %s to %s
)�dryrun�cwdr��removeemptydirs�r4)*r#�	canonpathr��rsplitr.�	normalizer�rr0�trackedr�r)�
checkportablerfr�rrr�lexists�anyr�r%rr�makedirs�renamer/rr5�errno�ENOENTrrr�verboser5�dirstatecopyr6ry�wvfs�
unlinkpath�forget)"r��relsrc�otargetr��abspath�absname�	reltargetr��src�entry�already_commited�prevsrc�exists�samefiler��looks_like_copy_in_pctxr	�flags�	targetdir�tmp�	srcexistsrr4r�r�r�r�r�rhr�r�r6�targetsr6s"`                      @����������rar�copy.<locals>.copyfile�s�����&�&�t�y�y�#�w�?�	��9�� )�/�/��a�8��G��
�
�/�/��8�4�?�'�I�I��K�K�	�3�/�	����I�&���j�j�� ���
�
�'�'�	�2�� �=�=�<����_�����b�)�,��+�+�i�(�����G�G��@�A���K�K���,��K�K���-���
��������(�����f�	�)��}�}�&�&�v�.�$�-�-�2I�2I��3����G�G�A�=�>��J�K��������5�-=���>�#��M�N�C�/8�4�.?�/�C�H�%)�\�\�^�H�E�+�/�!�#$�!H�$�D�
$%�!E�$�D�
!�$6�E�$.�E�!� !�%=�!"�#(�	!(�!�!"�%;�!"�#(�	!(�!��B�C�C�� �K� �� !�!L�M�������(�����
������G�G��I�J�!�-�.���	�G�G��I�J�!�-�.�����
 ���I�I�f�%��G�G�O�O�F�3�;�t�	��w�w�}�}�Y�/�/��K�K�	�*�� �<�/�C��I�I�c�3�'��I�I�c�6�*��M�M�#��?� �	��:�:�U���	�	�!�0�1�V�4G�G�H��	�	�!�1�2�f�5H�H�I�#��	��	�����c�6�9�V��	
��&��Y�x����*�*�?�<N�O���	�	�$�$�V�5�$�9��J�J��x� �	!�6��/�	
 ��:�:����-��G�G�A�C�D�v�M�N� %�I��G�G��3�4�!�8�#6�#6�t�}�}�#E�F�G�� ��	
 �s�8CS2�2
V�<=V�?=V�Vc��>^^�[RRU5(a�[R"TR
TU5n[R"U5nT(a,[[RRU5S5mO[U5mT(aT[[R5-
mUU4SjnU$T(aU4SjnU$U4SjnU$)Nrc�r>�[RRT[R"U5TS5$r��rrrr/�	localpath�r�dest�striplens ��rar��,copy.<locals>.targetpathfn.<locals>.<lambda>0s$���B�G�G�L�L��t�~�~�a�/@���/K�Lr8c�>�[RRT[RR[R
"U555$r��rrrrr/r��rr�s �rar�r�2�/���B�G�G�L�L��b�g�g�&�&�t�~�~�a�'8�9�r8c�>�T$r�r�r�s �rar�r�6s���Dr8)rrrr#r�r�r/r�r�r�r%�ossep)	rOr�r��abspfx�resr�r��
destdirexistsr6s	 `   @���ra�targetpathfn�copy.<locals>.targetpathfn&s����
�7�7�=�=�����'�'��	�	�3��<�F��^�^�F�+�F���r�w�w�}�}�V�4�Q�7�8���v�;����C����/�/��L�C��
�
��C�
�
�!�C��
r8c�4>^^^�[R"U5(aU4SjnU$[R"TRT	U5n[U5[TSS5:GaUU4Sjn[R"U5n[U5mT(aT[[R5-
m[RR[RRT[RRU5S55(adU"T5n[[RRU5S5nU(aU[[R5-
nU"U5U:�aUmUU4SjnU$T
(aU4SjnU$U4SjnU$)Nc�>�[RRT[RR[R
"U555$r�r�r�s �rar��1copy.<locals>.targetpathafterfn.<locals>.<lambda>@r�r8rc��>�SnTHhn[RRT[R"US5US5n[RRU5(dMcUS-
nMj U$)Nrr
)rrrr/r�r�)r��scorerBr6r�r�s    ��ra�evalpath�1copy.<locals>.targetpathafterfn.<locals>.evalpathHs]����E�!���G�G�L�L��t�~�~�a��d�/C�H�I�/N�O���7�7�?�?�1�-�-�!�Q�J�E�"�!�Lr8r
c�r>�[RRT[R"U5TS5$r�r�r�s ��rar�r�[s$��������T�4�>�>�!�3D�X�Y�3O� Pr8c�>�[RRT[RR[R
"U555$r�r�r�s �rar�r�_s/���B�G�G�L�L��b�g�g�.�.�t�~�~�a�/@�A�%r8c�>�T$r�r�r�s �rar�r�cs���Dr8)r��patkindr#r�r�r�r/r�r%r�rrrrr�)rOr�r�r�r�r�r��	striplen1r�r�r�r6s ``     @���ra�targetpathafterfn�copy.<locals>.targetpathafterfn=s7������C� � ��C�H�
�A�'�'��	�	�3��<�F��6�{�S��a����_�,�!�����/���v�;�����H�N�N� 3�3�H��7�7�=�=������d�B�G�G�M�M�&�4I�!�4L�!M�N�N�$�X�.�E� #�B�G�G�M�M�&�$9�!�$<� =�I� �!�S����%8�8�	��	�*�U�2�#,��P���
�
!��C�
�
�)�C��
r8s@with multiple sources, destination must be an existing directorys!destination %s is not a directorys)maybe you meant to use --after --at-rev=.r)5rqr�rfrrgrr�	revsingler�r�r�r)�getuipathfnr�r�r�r(r��overlayworkingctx�setbaser(�graftr�p1copiesr��p2copiesr��
markcopiedr�r�r��tomemctx_for_amendr�r.r�r2�movedirstater��
expandpatsr�r#r�r��hasdirr�rrr�islinkr�r�r/�endswithsep))r6r6r;rhr�r�r��new_ctxr�r�current_copiesr��mem_ctx�new_noder�r�r��absdest�copylistrOr�r�r�r�rr�r��tfnr	�errors�
targetpathr�r�r�r�r�r�r�r�r�r�s)`` ``                            @@@@@@@@rar�r��s����� ��y�:�,�?��+�+�-�C��G�
�X�X�i�
 �F��H�H�X��E�
�X�X�j�
!�F�
�(�(�9�
�C�
��e��"�"�1�%A�#B�C�C��"�"�4��-���s�{�{�}���!��"�"��<�=��
�"�
�4�j���6�6�8�D��"�"�4�T�B�H�
��7�7�9���G��3�;�;�=�!�A�%��&�&�q�)N�'O�P�P�!�� � �����	�{�I�>��/�/��5�G��O�O�C�F�F�H�%��N�N�4��7�3��
�
�c�4��.����������c�l�l�n�-��&�&�t�,�����%��A��"��
�%�%�d�+����Q�������U���q�k�"��	!��7�7�9� �����!�4�4�S�9��"�>�>�+���=�=�#�#�%�����3����7�7��=��,�,�T�4��>�B�>� #���
�X�J�7���$�$��,�	�D���	����d�#�D�����q�!F�G�H�H�
�4�y�A�~����q�!<�=�>�>��8�8�:�D���B�w�w�y�����T�C�G�G�I�;�	�:��$�$�T�Y�Y��T�:���:�:�g����"�"��M�N��7�#�$��
��#���"�"��>�?��G�$�c�*�+��
�	����C��3�<�D���#'���S�%�����$�$(�	���"�"�1�%8�#9�:�:��x�=�A���"�"�1�%I�#J�K�K��+�+�D�1���������!����t�S�w�/����7�H�Q�K�0�
�Y�Y�[��0�0��5�G��~�~�'�H��}�}���!�S�X�X�Z�/��]�]�3�3�D�9��(�(��t�H�~�>�:��H�H�J��
�3�L�� � ��|�W�t�L��	�
X!�X!�|�.'�R�G�G�M�M�$�'�D������t�0D�,D�M���t�9�q�=�H�,�,�T�!�W�5�5��"�"��*���
����D�!�!��"�"��6�7�$�>��
��C�����H����s�|��������S�$��-�t�4�5�	�
�����A�B�D����q�!4�5�D�A�A�
�F�$��
�D�%)�!�F�F�E����
�6�(:�E�B�B��!���&*�%�
�Q�;��Q>�=����	��l:�9���[�	�sJ�A)a(�a�2a(�&A)b�a9�*2b�
a%	� a(�(
a6�9
b	�b�
bc��SSKJn URS5nURS5n	URS5=(d URS5n
URS5=(d URS5nURS5nURS5n
URS	5nURS
5nURS5nURS5nURS
5(+nUSnUSn[URS5=(d S5nU(dgSn[	X5nU(aUn	OU	(aU	R5n	OSn	UR
SU	=(d S-5 [U5S:XaURU[5 URS5(aCU
(aU(d[R"[S55eXnX=(d [nO]U(aRXnXnX�S:waUSnU[nUR5[:XaUR[S55 OUup�SnU(Ga6X�S:waU"XR!55 X�S:wa.UR#UR!5UR!55 URS5(dU(a3UR$R'U=(d SUR)55 URSS5n[+5n[,R,"UUUUUUSUS-S9 [9U5nU(aU	(aURU	5 GOZURS5(dU(aSnO [:R<"UU=(d /5n[?USS!5nURS5(aSnO![AS0S"U0[0RB"U5D6n0n[DHn [FU "XUU5 M 0n!U(aS U!S#'URS$5(aS$U!S%'URHRKU!S&5 URMX�UUUUS'9n[NHn [PU "UU5 M SSS5 GO/URS5(dU(aU=(d SnOURS5n[,RT"5n"[+5n[,RV"UUUU"UUUUSS(9	 URS5(aSnO	[AS)S*9nUR]UUR!5UR!54U	UU"U
UUUS+9	n#0n!URS$5(aS$U!S%'URHRKU!S&5 U#RM5nSSS5 U"R_5 URS5(a"U(aUR[S,55 OKURS5(a5U(a[aU5U
:wa[Rb"[S-55e[S.5n$U(a[S/5[eU5-n$U$UU4$![Ra Uup�GNrf=f![R.a7n[R"[0R2"U5[S5S9eSnAf[R4aEnU(d*[R6"[0R2"U55eU(aS nSnAGN�SnAff=f!,(df   GN�=f![R.a7n[R"[XRZ"U5[S5S9eSnAf[R4a/n[R6"[XRZ"U55eSnAff=f!,(df   GN5=f!U"R_5 f=f)1a�Utility function used by commands.import to import a single patch

This function is explicitly defined here to help the evolve extension to
wrap this part of the import logic.

The API is currently a bit ugly because it a simple code translation from
the import command. Feel free to make it better.

:patchdata: a dictionary containing parsed patch data (such as from
            ``patch.extract()``)
:parents: nodes that will be parent of the created commit
:opts: the full dict of option passed to the import command
:msgs: list to save commit message to.
       (used in case we need to save it when failing)
:updatefunc: a function that update a repo to a given node
             updatefunc(<repo>, <node>)
r
r�sfilenamer=rCrA�branchsnodeidsp1sp2s	no_commits
import_branchsbypasssstripsprefixrRr)NNFFNsmessage:
%s
r8sexactsnot a Mercurial patchs\warning: import the patch as a normal revision
(use --exact to import the patch as a merge)
�defaultspartialgY@)�stripr�r�r��
similaritys7check that whitespace in the patch has not been mangledrTs
import.normalr)r�sallowemptycommit�secret)sphasess
new-commitsimport)r�editorr�r�s
import.bypassr#)r�r�rursr�rs3warning: can't check exact import with --no-commit
s%patch is damaged or loses informationsapplied to working directorys
created %sr�)3r�r�rf�floatrrrr�r�rrrgr�	RepoErrorr�r�r��
setparentsr.�	setbranch�currenttransactionr�r"rr%r,rrr�r)r&rr&r-�extrapreimport�extrapreimportmapr6r�r��extrapostimport�extrapostimportmapr��	filestore�	patchrepor2�forcebytestrr�rrrr)%r6r6�	patchdatar�rh�msgs�
updatefuncr�rOr7rursr��nodeidr�r��nocommit�importbranchr�rr��sim�rejects�cmdline_messagerWr^r�r�rVrrr��idfuncr=�storer�r�s%                                     ra�tryimportoner1�s���&��m�m�K�(�G��m�m�J�'�G��8�8�G��6�	�
�
�g� 6�D��8�8�G��6�	�
�
�g� 6�D�
�]�]�9�
%�F�
�]�]�9�
%�F�	���u�	�B�	���u�	�B��x�x��%�H��8�8�,�-�L����)�$�
$�F���N�E�
�)�_�F�
�����'�,�1�
-�C�� ��G� ��*�O��!��	��-�-�/�����H�H�
�'�.�S�
1�2�
�7�|�q�����t�G�}�%��x�x�����R��"�"�1�%=�#>�?�?�
�X��
�-��
 ��	�
	���B���B��Q�Z���Q�Z���'�]���6�6�8�w���G�G��F��
������A�
�
�����t�W�W�Y�'�
�����O�O�B�G�G�I�r�w�w�y�1��8�8�H�����M�M�#�#��$�*�d�&=�&=�&?�
��(�(�:�u�-�����	��K�K����������;�	
�.�U��������G�$���x�x��!�!�R����&�&�t�U�[�b�9��$�T�$�Z�1A�B�H��x�x��!�!���(��%��)1�);�);�D�)A����E�(��!�&�)�$�5�$�G�)��I��:>�	�6�7��x�x�	�"�"�8A�	�4�5����'�'�	�9�=��K�K��4�q��u� ���.�F�&�v�.�t�A�w�7�.�	>�=��8�8�H�����)�z�F��Y�Y�[�F����!��-	��E�E�
C������������ �
�(�x�x��!�!���(�2B�C���^�^������B�G�G�I�&��������$�
�F��I��x�x�	�"�"�8A�	�4�5����'�'�	�9�=��M�M�O��>�
�K�K�M��x�x����h�	����I�J�K�	
���(�	�	�Q�#�a�&�F�*:��k�k�!�D�E�F�F�
�+�
,�C���
���q��)����7�?���c���	��F�B��	��J�$�$�	��"�"�� � ��#��N���
���*�*�	���&�&�x�'7�'7��':�;�;������		��B>�=��4�(�(�
��&�&��+�+�A�.��R������.�.�
C��&�&�z�'>�'>�q�'A�B�B��
C��*>�=��
�K�K�M�s��Y7�"Z�3\;�&
_.�1]
�
B_.�_�._.�7Z�Z�\8�*2[�\8�3:\3�3\8�;
]
�
_�!2^�_�**_�_�_.�
_+�&_.�.`c��[R"U5nUR5Vs/sHo�(dMUR5PM n	nUR	5n
U(aU	R5 U	(aU	SnOURnURUS9 URS5 URSSUR55 URSUR5-5 URSSURUR555 URU
=(a U
S	:gS
SU
5 URSS
[U55 URS[U5-5 [U	5S:�a URS[U	S5-5 UR!UR#[$R&"[U	5SS9S9 [(H+n[*U"XQ5n
U
cMURSU
-5 M- URSSUR-5R/55 URS5 UR15(a3[2R4"XXsUS9nUHunnURUUS9 M g[2R6"XXsUS9nUR!SR9U5S9 gs snf)Nr�r�s# HG changeset patch
rCs
# User %s
s
# Date %d %d
rAs
#      %s
rrs# Branch %s
�nodes
# Node ID %s
s
# Parent  %s
r
r_)r�s# %s
sdescr�r��rhr�r8)r
)r)�binnoder�r�r��reverser
r�r�r�rurs�
formatdate�	condwriterr�r��
formatlistr%�maplist�extraexport�extraexportmapr��rstrip�isplainr"�diffuir
r)r6r�r�r�
switch_parentrQrCr�rr�r��prev�headeridr��	chunkiterr�r�s                 ra�
_exportsinglerE�s/���?�?�3��D�!$����4��A�!�x�q�v�v�x��G�4�
�Z�Z�\�F��������q�z���{�{���J�J�3�J���H�H�
&�'��H�H�W�n�c�h�h�j�1��H�H�
�����
+�,��H�H�W�n�b�m�m�C�H�H�J�&?�@��L�L��'�6�Z�'��4D�f���H�H�W�'��T��3��H�H�
��T��
*�+�
�7�|�a��
���"�S����_�4�5��G�G�B�M�M�(�"2�"2�3��"@�w�M�O�G�P� ����)�%�5�����H�H�Y��'�(� �
�H�H�W�g�s���0�7�7�9�:��H�H�U�O�	�z�z�|�|��L�L��T�x�H�	�%�L�E�5��H�H�U�%�H�(�&��J�J�t�4�X�F�	�
���S�X�X�i�(��)��Q5s
�
K�Kc
���[US5H[upxXn	URS5(dURRSU-5 UR	5 [X	X&XGU5 M] g)z,Export changesets to stdout or a single filer
�<r�N)�	enumerater�r6r~r�rE)
r6r�r�r�rArCrrQr�r�s
          ra�_exportfilerI�sV����a�(�
���i�����t�$�$��G�G�L�L��4��(�
�����d��M�(�K�)r8c��[U5n[SU55n[R"5n	[	US5H6up�Xn[X�XzUS9n
U	R
U
/5RX�45 M8 U	Hon
[R"X-5nURRSU
-5 X�H'up�UR5 Xn[XX�XJU5 M) SSS5 Mq g!,(df   M�=f)z,Export changesets to possibly multiple filesc3�J# �UHn[[U55v� M g7fr�)r��str)r�r�s  rar��$_exportfntemplate.<locals>.<genexpr>�s���1�D�S�3�s�3�x�=�=�D�s�!#r
)rPrQrRr�N)r��maxr/�sortdictrHrZ�
setdefaultr�r�maybereopenr6r~r�rE)r6r��basefm�
fntemplaterArCrrPrR�filemaprQr�r�r�r�s               ra�_exportfntemplaterU�s���
��I�E��1�D�1�1�H��m�m�o�G���a�(�
���i����5��
��	���4��$�+�+�U�L�9�)���
�
"�
"�6�
0�B��G�G�L�L��4��(�%�m�
�������i����r�-���,�1�
0��
0�
0�s
�AC/�/
C>	c�2�[5nUHCnXR5H*nU(aU"U5(dMURU5 M, ME [R"X5nUVs/sHoDU4PM nn[R
"X5 gs snfr�)r�r�r�r)r&�
prefetchfiles)r6r�r�allfilesr�r��
revmatchess       ra�_prefetchchangedfilesrZ�sx���u�H����I�O�O�%�D��E�$�K�K����T�"�&��
���t�.�E�*.�/�$�3��,�$�J�/����$�+��0s�.
Bc	�f�[XU5 U(d[XUSXEU5 g[XX#XEU5 g)aRexport changesets as hg patches

Args:
  repo: The repository from which we're exporting revisions.
  revs: A list of revisions to export as revision numbers.
  basefm: A formatter to which patches should be written.
  fntemplate: An optional string to use for generating patch file names.
  switch_parent: If True, show diffs against second parent when not nullid.
                 Default is false, which always shows diff against p1.
  opts: diff options to use for generating the patch.
  match: If specified, only export changes to files matching this matcher.

Returns:
  Nothing.

Side Effect:
  "HG Changeset Patch" data is emitted to one of the following
  destinations:
    fntemplate specified: Each rev is written to a unique file named using
                        the given template.
    Otherwise: All revs will be written to basefm.
�	<unnamed>N)rZrIrU)r6r�rRrSrArhrs       ra�exportr]�s7��>�$�e�,������m�5�	
�	���M��	
r8c
���[XU5 [USS5n[R"URUS05n[	XXvX4U5 SSS5 g!,(df   g=f)z*Export changesets to the given file streamr`r\sexportN)rZr�rr6rI)r6r�rPrArhrr�r�s        ra�
exportfiler_
	sN���$�e�,��2�v�|�,�D�	�	�	�T�W�W�b�)�R�	8�B��D��-�u�E�
9�	8�	8�s�A�
A#c�<�UbURSSU5 URSS[UR555 UR5nUR	USSUR[
[U5SS95 URS	S
UR55 UR5nUb0URSSUR[
[U5SS
S95 URSSURUR555 UR5R5nURSS5 [R"[R U5nURSSUR#USS
S95 UR%S5 g)z`utility function to display obsolescence marker in a readable way

To be used by debug function.Nsindexs%i sprednodes%s s	succnodesr4r_sflags%X sparentnodess{%s} �, )r`�seprAs(%s) smetadatas{%s}s%r: %r)�fmtrbr�)r�r�prednode�	succnodesr9r:�mapr��parentnodesr8rs�metadatar�r�r%�rapply�maybebytestr�
formatdictr�)r��marker�index�succsr��meta�smetas       ra�
showmarkerrq	sO��
��
����6�5�)��H�H�[�&�#�f�o�o�&7�"8�9�����E��L�L�
���
�
�
�c�#�u�o�G�
�4�	��H�H�W�f�f�l�l�n�-�� � �"�G���
������M�M�#�c�7�+�'�u�M�E�	
�
�H�H�W�h��
�
�f�k�k�m� <�=��?�?��!�!�#�D��H�H�W�d���O�O�H�1�1�4�8�E��H�H��W�b�m�m�E�y�e�m�L���H�H�U�Or8c�2�URSU5nUR5nUR
[S5U[R"XR554-5 SU-$![a  [R"[S55ef=f)z;Find the tipmost changeset that matches the given date specsdate(%s)s revision matching date not foundsfound revision %d from %s
s%d)
r�rN�
ValueErrorrrgrr5r1�datestrrs)r6r6rs�mrevsr�s     ra�finddaterv6	s����I�I�k�4�(�E�G��i�i�k���I�I�	�
(�)��� � �����!1�2�
3�	4���3�;����G����q�!D�E�F�F�G�s�A,�,*Bc
��^^�/mUU4Sjn/nUSn	Sn
[R"U5up�U(dU(a![R"XUR5n
UR	TSS9m[
R"TU5n
URn[URU
[U	R5SSSS95H�nURU5nU=(a URnTRU5nU(d;U(aMJX�;dMQURRU5(dMsU(aM|U
(aU
"U5 URU5 UR (d	U(aM�UR#[%S5U"U5-SS9 M� [U	R5H�nU	R'U5n[
R("UT5nURR+UU5n[R,"UU5nUR/S	5(a(TR1UR2"UUUUS40UD65 M�TR1UR2"UUUUS40UD65 M� UR/S5(d,U	R3X�5nTR1U4SjU55 T$![4R6a( UR#[%S
5U"U5-5 GMFf=f)
Nc�V>�TRU5=(d TRX5$r��r��bad�rk�yrzrs  ��rar��add.<locals>.<lambda>H	�������A��9�%�)�)�A�/�9r8T)�includeexactF)�subreposrr�full�
adding %s
sui.addremove.addedr�r��#skipping missing subrepository: %s
�dry_runc3�R># �UHoTR5;dMUv� M g7fr��r��r�r�rs  �rar��add.<locals>.<genexpr>�	�����=�h��u�{�{�}�*<�1�1�h���'�	')r)�checkportabilityalert�casecollisionauditorr.�narrowmatchr�r�r�r�rr0r�r�r�r�r�r�r5rr�
subdirmatcher�reljoin�subdiruipathfnrfr�r�r�LookupError)r6r6rr�r��explicitonlyrh�badfn�namesr<�cca�abortr�r�r.r�r�r�r��subpathr�submatch�	subprefix�subuipathfn�rejectedrzs  `                      @rar�r�E	s����
�C�9�E��E���:�D�
�C��/�/��3�K�E����*�*�2�d�m�m�D�����U���6�E�� � ���.�H��}�}�H���
�
���D�M�M�*����	�	
����"�"�1�%���)�E�M�M�����A�����<��
��	�	�!�!�!�$�$��G���A���L�L��O��z�z����	�	��n�%����3�;P���5�<�$�-�-�(���h�h�w���	��-�-�g�u�=�H��	�	�)�)�&�'�:�I�!�0�0��(�C�K��x�x�
�#�#��
�
��G�G�B��)�[�%�P�4�P���
�
��G�G�B��)�[�$�O�$�O��)�&�8�8�I����8�8�E�*���
�
�=�h�=�=��J��� � �	��I�I��9�:�X�g�=N�N�
�
�	�s�BJ:�&J:�:7K6�5K6c��URX!'URRSXR4-5 URS5H:nXnURH#nURU5R
X5 M% M< g)Nsadding %s = %s
sfilelog("path:.hgsub"))r�r6rr�rr�
addwebdirpath)r6�
serverpath�webconfr r�r�s      rar�r��	sk���)�)�G���G�G�M�M�%��Y�Y�(?�?�@�
�Y�Y�0�
1���g���|�|�G��G�G�G��*�*�:�?�$�2r8c	�	^^^�U(a&U(a[R"[S55e/mUU4SjnUSn	/n
UR[R
"TU5SS9n[
URUR-UR-UR-5nU(a*UV
s/sHn
TRU
5(dMU
PM nn
[
U	R5H�nU	RU5n[R"UT5nURR!X>5n["R$"X�5nUR'UUUUUS9unnTR)UV
s/sH
o�S-U
-PM sn
5 U
R)UV
s/sH
o�S-U
-PM sn
5 M� U(d�TR-5H�n
X�R.;dMURR1U
5(aM6X�;dM=URR3U
5(aNUR.R5U
5UR.;aM�UR7[S5U"U
5-5 TR9U
5 M� U(Ga[S	5nUSSH�nUR;[S
5U"U5U4-5nUS:Xa{US:XauUR=U5SH0unnUR?S
U[@RB"U54-5 M2 UR;[S
5U"U5U4-5nUS:XaMuUS:XaM�US:XaUREU5 M�US:XaURGU5nUUS2	 OUS:XdM� O UHUn
URH(dTRU
5(a	U(dM3UR[S5U"U
5-SS9 MW U(dGU	R'X�5mTR)U4SjT55 U
R)U4SjU55 TU
4$s sn
fs sn
fs sn
f![R*a( UR[S5U"U5-5 GM�f=f)Ns/cannot specify both --dry-run and --interactivec�V>�TRU5=(d TRX5$r�ryr{s  ��rar��forget.<locals>.<lambda>�	r~r8T�rr)r�r\ror�s+not removing %s: file is already untracked
s�[Ynsa?]$$ &Yes, forget this file$$ &No, skip this file$$ &Skip remaining files$$ Include &all remaining files$$ &? (display help)sforget %s %s�r
s%s - %s
rrL��removing %s
�ui.addremove.removedr�c3�R># �UHoTR5;dMUv� M g7fr�r�r�s  �rar��forget.<locals>.<genexpr>�	r�r�c3�6># �UHoT;dM
Uv� M g7fr�r�)r�r�r�s  �rar�r��	s����=��A�H�+<�a�a��s�	�	)%rrgrr5r�r�r�r�r�rrr�rrr�r�r�r)r�r�r�r�r�r.rr�r�r�r��promptchoice�extractchoicesr�r�lower�removermr�)r6r6rr�r�r�r�r\r�r<�forgotrBr�r�r�rr�r�r��subbad�	subforgot�	responsesr�r rQr6�fnindexrzr�s  `                        @@rar�r��	s�����+����
�@�A�
�	
�
�C�9�E���:�D�
�F����(�+�+�E�5�9���F�A�
�A�J�J����(�1�9�9�4�q�w�w�>�
?�F��#�6�V��u�{�{�1�~�!�V��6��$�-�-�(���h�h�w����)�)�'�5�9���I�I�%�%�f�6�	��,�,�W�?��
	� #�
�
�����'�!+�!��F�I�
�J�J�F�;�F�q�$���*�F�;�<��M�M�y�A�y�!�T�>�A�-�y�A�B�)�(�����A��
�
�%�d�i�i�o�o�a�.@�.@��?��y�y�'�'��*�*�
 �=�=�2�2�1�5����F�$�����!?��'�q�k�	*���J�J�q�M�#�&��
$�
�	��q�	�H�����/�"�h�x�&8�)�%D�D��A��A�v��1�f� "� 1� 1�)� <�Q� ?���1������H�N�N�1�4E�0F�!F�G�!@�����/�*�h�x�.@�)�-L�L��A��1�f��A�v���a���
�
�h�'��a�� �,�,�x�0���7�8�$���a���)"�,��
�:�:�U�[�[��^�^�{�{��I�I��"�#�h�q�k�1�9P�
�
����;�;�v�.���
�
�=�h�=�=��
�
�=��=�=���;���g7��<��A��� � �	��I�I��9�:�X�g�=N�N�
�
�	�s<�-P=�P=�%Q�*Q
�;Q�Q
�"Q�
Q�7R�Rc	��SnUR=(d SS1UR5-nUR5(a�U(d�/n	URU5HRn
U	R	XS"U
5-5 [U	5S:�a%UR
SRU	55 U	SS2	SnMT U	(a UR
SRU	55 O�URU5H�n
UR5 URUS9 U(a4XnUR
SS	UR5UR55 URU
S
9 URXS"U
5-5 SnM� [UR5H�n[ R""X�5n
[$R&"X�5nU(d6UR)U5(d [+U
R-55(dMlUR/U5nUR)U5=(d UnUR1X
X�UU5S:XaSnM�M� U$![2R4a' UR7[9S5U"U5-5 M�f=f)Nr
ssizesflags�dr8rr3s
size flagss% 10d % 1s �rr�)r��datahintr?�matchesr�r�r�rr�r��sizer�r�r�r�rr�r�r)r�r�r�r�r�
printfilesrr�r5r)r6r�rVr�r�rcr��ret�	needsfctx�bufr��fcr�r�r�r�recurses                 rar�r��	s��
�C��
�
�A�w��1�B�K�K�M�A�I�	�z�z�|�|�I������Q��A��J�J�s�X�a�[�(�)��3�x�#�~�������#��'���F��C� ���H�H�S�X�X�c�]�#�����Q��A��L�L�N��J�J�3�J����V����������	�2�8�8�:�N��G�G��G�O��H�H�S�8�A�;�&�'��C� ��#�,�,�'���)�)�'�5���,�,�W�?���q�w�w�w�'�'�3�x�~�~�/?�+@�+@��'�'�'�"�C�
��'�'�'�*�6�h���N�N�2��#�w�O����C��(�$�J��
�$�$�
��	�	��=�>��w�'�(��
�s�4I�7I>�=I>c
��^ ^!�Sn
URUSS9nURURURUR4up�p�USm!U	c/n	SnOSn[T!R5nUR[S5[U5[S5S9nUH�n[R"UU5nURRUU5n[R"UU5nU(d6UR!U5(d [#UR%55(dM�UR'5 T!R)U5nUR+UUUUUUUU	5(aSn
M�M� UR35 [4R6"U5nUR%5nUR[S
5[U5[S5S9nUH�m U U!4SjnUR'5 T U;=(d T!R9T 5nT UR:;dU(dT S
:XdU"5(dT U;aMhURR=T 5(agURR?T 5(a$U	R1[S5U"T 5-5 O#U	R1[S5U"T 5-5 Sn
M� UR35 U(aX�-U-U
-nGOjU(a�UnX�-U-nUR[S5[U5[S5S9nUHOm UR'5 UR@(dT U;a#U	R1[S5U"T 5-5 Sn
MQ UR35 O�X�-nUR[S5[U5[U
5-[S5S9nUH8m UR'5 U	R1[S5U"T 5-5 Sn
M: U
H8m UR'5 U	R1[S5U"T 5-5 Sn
M: UR35 [U5nUR[S
5[U5[S5S9nUH^m UR@(dUR!T 5(aM,UR'5 UR[S5U"T 5-SS9 M` UR35 U(d|URC5 U(dHUHBm T U
;aMURDRGSS5nURRIT SUS9 MD USRKU5 SSS5 U(aU	HnURMU5 M U
$![,R.a( U	R1[S	5U"U5-5 GMCf=f!,(df   Np=f)NrTr�Fs	searchingrT)rP�unitr
r�sdeletingsfilesc�b>�TRHnTRUS-5(dM g g)NroTF)rr�)r�r�r<s ��ra�	insubrepo�remove.<locals>.insubrepo`
s,����=�=���<�<��$��/�/��)�r8r�s"not removing %s: no tracked files
s#not removing %s: file is untracked
sskippings#not removing %s: file still exists
s<not removing %s: file is modified (use -f to force removal)
sLnot removing %s: file has been marked for add (use 'hg forget' to undo add)
r�r�r�r�r�)�
ignoremissingr4)'r5r�r�rrr�r�makeprogressrr�r�r�r�r�r)r�r�r�r��	incrementr�removefilesrr�r��completer#�dirsrr.r�rr�r�r6ryr�r�r�)"r6r6rVr�r�r�r�r�r��warningsr�rBr�r�rrr�r?�progressr�r�r�r�r�deleteddirsr�r�rr��	remainingr4�warningr�r<s"                                @@rar�r�+
sQ����C����!�4��(�A�&'�j�j�!�'�'�1�9�9�a�g�g�&M�#�H�W���:�D����������$�-�-� �D����	�,��s�4�y�q��~���H����)�)�'�1�5���I�I�%�%�f�g�6�	��,�,�W�h�?���q�w�w�w�'�'�3�x�~�~�/?�+@�+@���� ��(�(�7�#�C�
��?�?���������	�	��C�	��0
�����-�-��(�K�
�G�G�I�E����	�+��c�%�j�q��{���H���	�	�����[� �2�D�K�K��N����
�
���!�t�)�y�{�{�a�4�i���9�9���A����y�y���q�!�!�����<�=����K������=�>��!��L����/�0
������!�E�)�E�1��	����$�u�,�	��?�?�
�k�N�#�i�.�q��{�#�
���A���� ��z�z�a�5�j�����=�>��!��L���C�
�	��������?�?�
�k�N�3�x�=�3�u�:�#=�Q�x�[�#�
���A���� ��O�O��,���1�+�	�
��C���A���� ��O�O��8���1�+�	�
��C��	�����$�<�D����	�+��c�$�i�a��k���H���
�:�:�Q�W�W�Q�Z�Z���� ��I�I��"�#�h�q�k�1�9P�
�
��
�����
�Z�Z�\���A��E�z� � �G�G�.�.�'�);��E��I�I�(�(��$�e�(�L�
�
��J���d�#����G��G�G�G�� ��J��]�$�$�
�����=�>��w�'�(���
��~�\�s�V �A$W� 7W�W�
W-c�`�UR5(+=(d SUR5;$)N�data)r�)r�s ra�_catfmtneedsdatar��
s!���{�{�}��8��2�;�;�=� 8�8r8c��Sn[U5(a8XR5nU(aUR5RX55nUR	5 URUS9 UR
SSU5 URUS9 g)z�Hook for adding data to the formatter used by ``hg cat``.

Extensions (e.g., lfs) can wrap this to inject keywords/data, but must call
this method first.r8r3r�s%sr�N)r�r�r6�
wwritedatar�r�r�)r�r�r�r�decoder�s      ra�_updatecatformatterr��
sp���D������y�~�~�����8�8�:�(�(��4�D��L�L�N��J�J�3�J���H�H�W�e�T�"��G�G��G�r8c�:^^^^^^�SnUUUUUU4Sjn	[TR55S:Xa�TR5(d�TR5Sn
URnTR	5nU(a\X�RU
5S(aA[
T5(a([R"UTR5T4/5 U	"U
5 g[
T5(a([R"UTR5T4/5 TRT5H
n
U	"U
5 SnM [R"USS9n[TR5HknTRU5n[ R""UT5n[$R&R)TU5nUR*"UTTU40TD6(dSnMkMm U$![a GNf=f![,R.a' UR1[3S5U"U5-5 M�f=f)Nr
c
�>�SnT(a][TT[RRTU5S9n[R"[RRU55 [R"TU5n[UTTUTRS55 SSS5 g![a NKf=f!,(df   g=f)N)rSr�)rZrrrr�rr5rrQr�rf)	rr�r�rRr�rSr�rhr�s	   ������rar��cat.<locals>.write�
s�������#��Z�"�'�'�,�,�v�t�*D��H�
����B�G�G�O�O�H�5�6��
"�
"�6�8�
4����C��$�����8J�K�5�
4���
��
��
4�
4�s�3B'�?B7�'
B4�3B4�7
CrTr�r�)r�r��anypatsr��manifestnoderMr�r)rWr�rNr�r�r�rrr�r�rrr�catr�RepoLookupErrorr5r)r6r6r�r�rRrSr�rhrFr�r��mfl�mfnoder�r�r�rr�r�s  ``````           rar�r��
s����
�C�L�L� �7�=�=�?��q� ����):�):��}�}��q�!�������!�!�#��	��#�+�*�*�4�0��3�#�F�+�+��)�)�$�#�'�'�)�W�1E�0F�G��d����������d�c�g�g�i��%9�$:�;��x�x�� ��
�c�
���!��"�"�4�T�B�H��#�,�,�'���g�g�g���	��-�-�g�w�?�H������V�W�5�I��7�7�����	�
�����(�$�J��;�	��	��0�$�$�	��I�I��9�:�X�g�=N�N�
�	�s&�6A"G�2AG�
G�G�7H�Hc�6�\rSrSrSrSrSrSrSrSr	Sr
g	)
�_AddRemoveContextia	a small (hacky) context to deal with lazy opening of context

This is to be used in the `commit` function right below. This deals with
lazily open a `changing_files` context inside a `transaction` that span the
full commit operation.

We need :
- a `changing_files` context to wrap the dirstate change within the
  "addremove" operation,
- a transaction to make sure these change are not written right after the
  addremove, but when the commit operation succeed.

However it get complicated because:
- opening a transaction "this early" shuffle hooks order, especially the
  `precommit` one happening after the `pretxtopen` one which I am not too
  enthusiastic about.
- the `mq` extensions + the `record` extension stacks many layers of call
  to implement `qrefresh --interactive` and this result with `mq` calling a
  `strip` in the middle of this function. Which prevent the existence of
  transaction wrapping all of its function code. (however, `qrefresh` never
  call the `addremove` bits.
- the largefile extensions (and maybe other extensions?) wraps `addremove`
  so slicing `addremove` in smaller bits is a complex endeavour.

So I eventually took a this shortcut that open the transaction if we
actually needs it, not disturbing much of the rest of the code.

It will result in some hooks order change for `hg commit --addremove`,
however it seems a corner case enough to ignore that for now (hopefully).

Notes that None of the above problems seems insurmountable, however I have
been fighting with this specific piece of code for a couple of day already
and I need a solution to keep moving forward on the bigger work around
`changing_files` context that is being introduced at the same time as this
hack.

Each problem seems to have a solution:
- the hook order issue could be solved by refactoring the many-layer stack
  that currently composes a commit and calling them earlier,
- the mq issue could be solved by refactoring `mq` so that the final strip
  is done after transaction closure. Be warned that the mq code is quite
  antic however.
- large-file could be reworked in parallel of the `addremove` to be
  friendlier to this.

However each of these tasks are too much a diversion right now. In addition
they will be much easier to undertake when the `changing_files` dust has
settled.c�:�XlSUlSUlSUlgr�)�_repo�_transaction�_dirstate_context�_state)rgr6s  rari�_AddRemoveContext.__init__Hs���
� ���!%�����r8c�2�URbeSUlU$)NT)r�rcs rarn�_AddRemoveContext.__enter__Ns���{�{�"�"�"�����r8c�h�URceURc:URRS5UlURR	5 UR
cOURRRUR5UlUR
R	5 gg)a+open a `transaction` and `changing_files` context

Call this when you know that change to the dirstate will be needed and
we need to open the transaction early

This will also open the dirstate `changing_files` context, so you should
call `close_dirstate_context` when the distate changes are done.
N�commit)r�r�r�r�rnr�r.�changing_filesrcs ra�open_transaction�"_AddRemoveContext.open_transactionSs����{�{�&�&�&����$� $�
�
� 6� 6�y� A�D�����'�'�)��!�!�)�%)�Z�Z�%8�%8�%G�%G��
�
�&�D�"�
�"�"�,�,�.�	*r8c�h�URb%URRSSS5 SUlgg)z�close the change_files if any

Call this after the (potential) `open_transaction` call to close the
(potential) changing_files context.
N)r�rtrcs ra�close_dirstate_context�(_AddRemoveContext.close_dirstate_contextfs5���!�!�-��"�"�+�+�D�$��=�%)�D�"�.r8c��URbURR"U6 URbURR"U6 ggr�)r�rtr�)rgris  rart�_AddRemoveContext.__exit__psG���!�!�-��"�"�+�+�T�2����(����&�&��-�)r8)r�r�r�r�N)r�r�r�r�r�rirnr�r�rtr�r�r8rar�r�s!��/�b��
/�&*�.r8r�c��URS5nU(a[R"U5US'UR5 UR	5 [X5n[R"USX45n[U5nURS5(au[R"X45n	[R"UU	S9n
[R"UUSU
UURS9n[S5nUS:wa[R"U5eUR!5 U"XXgU5sSSS5 sSSS5 sSSS5 $!,(df   O=fSSS5 O!,(df   O=fSSS5 g!,(df   g=f)	z5commit the specified files or all outstanding changesrAN�	addremover�r8)�open_tr�5failed to mark all new/missing files as added/removedr)rfr1�	parsedater�r�rr)rr�r�r��	addremover�rrrr�)
r6r6r8r;rhrsr7r�rQ�relativer�r rVs
             rar�r�ws)���8�8�G��D�� �*�*�4�0��W�
�	
����t�y�y�{��R�&���-�-��T�
�D�7��
�t�
$���x�x��%�%�"�?�?�4�6��"�.�.��(0����%�%�������.�.�
���N�O����6��+�+�a�.�(�
�$�$�&��b��$�?�+%�
$�	#�{���%�
$��
$�	#�{�{�����sC�E:�1E �B%E�)	E �2	E:�
E�E �	E:� 
E.	�*E:�:
Fc�4�XR5;atURU5nXR5;aOURU5nURU5(+=(a! UR5UR5:H$gXR5;$�NF)�manifest�filectx�cmpr�)r��ctx1�ctx2r��bs     rar�r��sl���M�M�O���L�L��O���
�
������Q��A��u�u�Q�x�<�:�A�G�G�I�����$:�:���
�
��'�'r8c�~^^'^(^)^*�SSKJm' [R"U[R5(aUR5 UR
[S5T-5 TR5nUR5 UR5 URS5 USm*UR5nURTR55 URT*R55 [X5n[ R""U5nTR%5nUR'S5(a%[(R*"UR'S55nUR'S5=(d TR-5n	[/TR155S:�aSUR3T5n
[5U
R65[5U
R85-[5U
R:5-nO[5TR=55n[>R@"T*XE5n[>RB"XE5n
[>RD"XS9nUR'S5(abURFRIU5 [>RJ"XS	X�5S
:wa![S5n[LRN"U5eSSS5 ST*;dST;aN[PRR"UT*T*RTU5unnnU(aeU(a[PRV"UU5 [XRZR]U5n[^R`"U5 T*R=5Vs1sHnU"U5(dMUiM snm)[/T)5S
:�nURbReS
S5S:gnU(dU(a�[fRh"UT*5m(TRk5(a4T(RRh"TRk5T*55 URT)5 UVs/sHnUT);d[mUT*U5(aMUPM! nnU'U(U)UU*4SjnO%UR
[S5TU4-5 U4Sjn[oX5n[qTS5nU(d3TRs5nU(+=(d UR'S5S;nOUR'S5SLn[uUUS9nUR5nTRw5US'T'RyUUR{5TRk5R{5/UUUU	UUUS9	n[|R~"URs55nU(d�UTRs5:XanU	TR-5:XaZUTR%5:XdU(a?UTR5:Xa+TR{5sSSS5 sSSS5 sSSS5 $SnUR'S5(a[�R�nO&UR'S5(a[�R�nUR�U5n UR�5 URFR�U5 UR�U UR�5 URFn![5T*R75T*R95-5T)-n"U"HnU!R�USSSS9 M [5T*R;55T)-n#U#HnU!R�USSS9 M SSS5 TR{5U 40n$Sn%UR'S5(aS[�R�"US50n%UR�S S!5n&[>R�"UU$SU%SUU&S"9 SSS5 SSS5 SSS5 W $!,(df   GN=fs snfs snf!,(df   N�=f!,(df   NM=f!,(df   NV=f!,(df   W $=f)#Nr
r�samending changeset %s
samendrArCr�r�r8rr�s.hgsubr�scopies.read-fromsfilelog-onlyc�:>�UT;aUT
R5;agT
UnOT	RU5nUR5nTRUUUR	5UR5SU;SU;TR
U5S9nU$![a gf=f)Nr>�x)r�isexec�
copysource)r�r�r��
memfilectxrr�rfrN)r6�ctx_r�fctxr��mctxr��copied�filestoamend�oldr<s      �����rar��amend.<locals>.filectxfns���� ��|�+��4�<�<�>�1�#'�#�D�z��"�{�{�4�0�� �J�J�L�E�"�-�-����	�	���	�	��#�u�}�#�u�}�#)�:�:�d�#3�.��D� �K��� �� �s�B
�A.B
�
B�Bscopying changeset %s to %s
c�H>�TRU5$![a gf=fr�)r�rN)r6r	rrs   �rar�r/s)��� ��;�;�t�,�,��� �� �s��
!�!scommit.amendsedit�TNT)r#rsamend_source)r�rDr�r�rursr�rrsdraftr�F)r�r�snoterws
backup-bundle)rhr��targetphase�backup)Mr�r�r!�	isenabled�createmarkersoptrzr~rr�r�r�r�r�r�r�r|r%r[rsrfr1r�rur�r�r5r�r�r�r�r�r)rr�r�r.r�r�rrr,r�_status�
writestater�rr"r �checkunresolvedr6r�r�
pathcopiesr�r�rrr�r&rr�r�r�	stripdescr$�secret�draftr��resetr2rr
r3r�	fromlocalryr�)+r6r6rr�r;rh�baser{rsrurvr�r�r�r�rVr?r@�newsubstate�msr�r��changeset_copiesr�r7r�doeditr�	pureextra�new�newdesc�commitphaser�r.�normalfiles�removedfilesr>�obsmetadatarr�rr
r<s+  `                                    @@@@ra�amendr+�sm�������$�� 9� 9�:�:�
���
��G�G�A�(�)�C�/�0��6�6�8�D�	
����t�y�y�{�D�$4�$4�X�$>��D�z���
�
���	���S�Y�Y�[�!�	���T�Z�Z�\�"�/�r�8�
��#�#�D�)���x�x�z���8�8�G����%�%�d�h�h�w�&7�8�D��x�x�� �.�C�H�H�J���s�{�{�}���!����S�!�B�����$�s�2�8�8�}�4�s�2�:�:��F�E���	�	��$�E��-�-��d�1���?�?�4�.���&�&�t�J���8�8�L�!�!����-�-�d�3��$�$�T�C��H�A�M��P��A� �+�+�a�.�(�	N�4����	�S� 0�,7�,A�,A��D�$�,�,��-�)�D�*�k�"�!�>���&�&�t�[�9�
�
%�
%�
*�
*�4�
0���!�!�"�%�#'�:�:�<�>�<�a�7�1�:��<�>���l�#�a�'���G�G�N�N�?�,?�@��
�	��&��&�&�t�T�2�F��v�v�x�x��
�
�f�/�/�����$�?�@�
�L�L��&����A��\�)��!�T�4�1H���
��
 �
 �:
�G�G�A�5�6�#�t��D�E�
 ��R�&�� ��o�6����o�o�'�G�!�[�E�D�H�H�W�$5��$E�F��X�X�g�&�$�.�F� �f�x�@���J�J�L�	�!$�����o���n�n���Y�Y�[�#�&�&�(�-�-�/�2���������

���%�%�c�o�o�&7�8����3�?�?�,�,�����
�"������#�}��S�Y�Y�[�(��8�8�:�c%?�$>�{�{���f���8�8�I��� �-�-�K�
�X�X�h�
�
� �,�,�K����s�#��
���
�
�]�]�
+�
+�D�
1��O�O�E�4�;�;�/��}�}�H��d�m�m�o��
�
��<�=��L�K� ���$�$��$�4��%��!��t�|�|�~�.��=�L�!���$�$�Q�5�U�$�K�"�12�6�8�8�:��x�(�����8�8�G���"�H�$6�$6�t�G�}�$E�F�K����z�+;�<�������� ��#��	
�w%?�{��J�L�u4�3��,?��.�F2�
1��w%?�$>��{�{����J�L�s��`-�`�&G#`�	>_	�B)`�1_0
�_0
�B3`�?_5
�_5
�%F`�<	`�	`-�B`�#B'_:	�
A:`�`�`-�
_-
�(`�:
`
�`�
`�`�
`*	�&`-�-
`<c�b�UR5(aUR5$[XX#SS9$)NT)r�unchangedmessagedetection)r�r)r6r�r?rs    rar%r%�s0��
�������� � ���4�d��r8c
���U(d[S5nURS5Vs/sH
ow(dMUPM nnURSS5 Sn	U(aZSRU5n
URRSU
5(a[
XX$U
5=p�O%UR5 U(aMZ[XX$5n[R"5n[R"UR5 UR5n
URR!U
5 U
=(a# U
R#5=(a URnURR%UUR'5UR)5UUUR*SS9nUn[,R."[0U[,R2S9nU(aUSUR55n[,R6"S	S
U5n[R"U5 U(aU"U5nUR95(d[:R<"[S55eU(a$X�:Xa[:R<"[S55eU$s snf)
Ns$Leave message empty to abort commit.r�rs	changeset�committemplater�)r�pendingr�r�)r�s(?m)^HG:.*(
|$)r8sempty commit messagescommit message unchanged)rr��insertrr6r��buildcommittemplater��buildcommittextrr�r�chdirr�rr.r��writependingr#rur�r�re�search�
_linebelow�	MULTILINEr/rrrrg)r6r�r?rrrr-r��forms�templatetext�ref�
committext�olddir�trr0�
editortextrD�
stripbelows                  rarr�s�����<�=�� ���t�,�2�,�1��Q�,�E�2�	�L�L��L�!��L�
��i�i�����7�7�>�>�+�S�1�1�(;��4�3�)�
�L�
�
�	�	���%�%�T��?�
��_�_�
�F��H�H�T�Y�Y��
�	 �	 �	"�B��M�M������4�R�_�_�&�4�4�9�9�G����������
��	�	����������J��D����:�t�2�<�<�@�J���(�j�&�&�(�)��
�6�6�%�s�D�1�D��H�H�V����$����:�:�<�<����q�!8�9�:�:� �Z�%?����q�!<�=�>�>��K��e
3s
�
I0�I0c�n�URn[R"U5n[R"XPU5nUR
RRSURRS555 U(dSnUR5 URXS9 UR5$)Nc3�V# �UHupU[R"U54v� M! g7fr�)r.�
unquotestring)r��k�vs   rar��&buildcommittemplate.<locals>.<genexpr>�s)����:�D�A�
�I�#�#�A�&�'�:�s�')r/r8)r)r6r�reference_templatespecr�changesettemplaterr6�cacher��configitems�
pushbuffer�show�	popbuffer)r6r�r?rr<r6rCr6s        rar2r2�s���	
���B��+�+�C�0�D��%�%�b��5�A��C�C�I�I�����G�G�'�'�(9�:���
����M�M�O��F�F�3�F�"�
�<�<�>�r8c��SRURS5Vs/sHo(dMSU-PM sn5$s snf)Nr�sHG: %s)rr�)r�r�s  ra�hgprefixrP�s6���:�:�c�i�i��.>�D�.>��!�}�y�1�}�.>�D�E�E��Ds�
=�	=c
�@�/nUR5UR5UR5pvnUR5(aUR	UR55 UR	S5 UR	S5 UR	[[
S555 UR	[U55 UR	S5 UR	[[
S5UR5-55 UR5(a#UR	[[
S555 UR5(a4UR	[[
S5UR5-55 [R"U5(a0UR	[[
S5UR-55 URUVs/sHn[[
S5U-5PM sn5 URUV	s/sHn	[[
S	5U	-5PM sn	5 URUV	s/sHn	[[
S
5U	-5PM sn	5 URUV	s/sHn	[[
S5U	-5PM sn	5 U(d1U(d*U(d#UR	[[
S555 UR	S5 S
RU5$s snfs sn	fs sn	fs sn	f)Nr8s>Enter commit message.  Lines beginning with 'HG:' are removed.sHG: --suser: %ssbranch mergesbranch '%s's
bookmark '%s's
subrepo %ssadded %ss
changed %ss
removed %ssno files changedr�)r�r�r�r�r�rPrrur�r�r�isactivewdirparent�_activebookmarkr�r)
r6r�r?r�edittextr�r�r�rBr�s
          rar3r3�s+���H�"�|�|�~�s�y�y�{�C�K�K�M�W�H�
�����������)�*��O�O�C���O�O�C���O�O��
�=�
�	
��
�O�O�H�X�&�'��O�O�I���O�O�H�Q�{�^�c�h�h�j�8�9�:�
�v�v�x�x������?�!3�4�5�
�z�z�|�|������>�!2�S�Z�Z�\�!A�B�C��#�#�D�)�)������#3�!4�t�7K�7K�!K�L�M��O�O�T�B�T��X�a�
�.��2�3�T�B�C��O�O�5�A�5�a�X�a��n�q�0�1�5�A�B��O�O�X�F�X��X�a�
�.��2�3�X�F�G��O�O�W�E�W��X�a�
�.��2�3�W�E�F���'������#6�!7�8�9��O�O�C���:�:�h����C��A��F��Es�%!L�!L�!L�
!Lc��^^�XnUR5nUbCURR5U:Xa%URR	[S55 ObUR
S5(dLT(aEUT;a?[UU4SjU55(d$URR[S55 UR
S5(dkUHenUR5(dMUR5T:XdM0URR[S5UR5-5 Mg URR(aFURR[S5UR5UR54-5 gURR(a8URR[S5UR5U4-5 gg)Ns3warning: commit already existed in the repository!
r+c3�|># �UH1oR5T;=(a UR5T:Hv� M3 g7fr�)r�r�)r�r�bheadsr�s  ��rar��commitstatus.<locals>.<genexpr>'
s0����
�AH�A�F�F�H���7�1�8�8�:��#7�7��s�9<screated new head
�close_branchs reopening closed branch head %d
scommitted changeset %d:%s
)r�r�tipr6r�rrfr�r5�closesbranchr�r��	debugflagr�rr�)	r6r�r�rWrZrhr�r�r s	  ``     ra�commitstatusr]
sa���
�*�C��k�k�m�G�
��4�>�>�-�-�/�3�6�	
�����Q�N�O�P��H�H�W��������
�AH�
�
�
�	
�����q�.�/�0�<�8�8�N�#�#��A��~�~���A�H�H�J�&�$8�������:�;�a�e�e�g�E����w�w������
�
�
�,�-�����C�G�G�I�0F�F�	
�
��������
�
�a�6�7�3�7�7�9�c�:J�J�K�
r8c�P�UR[R"USX5S9$)Nr�)r5r)r)r6r;rhs   ra�postcommitstatusr_X
s"���;�;�W�]�]�4��:�t�B�;�C�Cr8c�H^^^=^>^?�[R"U5nURR5upVTR	5nTR5nXv:XaUn0m>[R"USS9m?UR5 URRU5 URSS5n	USn
[R"X�U5m=[U=4SjU
R55nT=R5(d�[R "T=S5nU
R#U5Hn
T=R%U
5T>U
'M UU>UU?4SjnTR#[R "T=U55Hn
U
T>;dMT=R%U
5T>U
'M! [R&"UT>5m=UR)UT=SSSS9nOMUR)UT=S	9nUH nUHn
T=R%U
5T>U
'M M" [R&"UT>5m=[+UR,5n[+UR.5n[+UR05n[+UR25n[+UR45nUR7UR85 [+UR:5n[+5nXW:Xa*UnUnUnUU-n[+5[+5[+5nnnO�UR)UT=S	9n[+UR,5n[+UR.5n[+UR05nUU-nUUU-
-nUU-nUU-nUU-nUU-nUU-nUUU--nUU-nUnXaR<:wa7[+U5nUHnUU;dMUR?U5 M UU-nUU-nUHqnURRAU5nU(dM'UT>;dM/URRCU5R0(dM[UREU5 ST>U'Ms [+U5n UHnUU;dMU R?U5 M UU -
n![+5nUH@n
URRCU
5R.(aM/UREU
5 MB UU-nU H@n
URRCU
5R.(dM/UREU
5 MB U U-n [+5n"UHKn
URGU
5n#[HRJRMU#5(dM:U"REU
5 MM UU"-n[+5n$UHKn
URGU
5n#[HRJRMU#5(dM:U$REU
5 MM UU$-n/[OS
54/[OS54/[OS54/[OS54/[OS
54/[OS54S[OS54S[OS54S.n%Sn&Sn'Sn(Sn)URS5(aU)=n&=n'n(U	(aU&n*OU'n*[+5n+U%Sn,URS5(dU%Sn,UU%SU)4U!U%SU)4UU%SU*4UU%SU)4UU%SU)4UU,U'4U U%SU)4UU%SU)4U"U%SU(4UU%SU)4U$U%SU(4UU%SU)4UU%SU)44
n-[T>RQ55GH�un
n.URGU
5n#U-GH�un/un0n1n2U
U/;aMU0GbPU0RSU
5 U2(a�U2U&:XaU+REU
5 O�U'U2::dX�RUTU
5(a�[RV"TX5n3[HRJRYU3URZS9n4TR][OS 5T?"U
5T?"U454-5 URS!5(d6U	(a[^R`"U#U35 O[^Rb"U#U35 URS!5(a2TRd(dU.(dTR)U1T?"U
5-5 O!U.(aTRgU1T?"U
5-5  GM� GM� URS!5(d�S"n5U5V6s/sHn6U%U6SPM
 n7n6[Rhn8[R&"UU7V9Vs/sHn9U9HnUPM M snn95n:U8"UTRk5U:4/5 [R"USU5n;[mUTT>T?U%U;U	U+5 U(aPUHJn<U
RoU<5Rp"TRU</UQ70[Rr"U5D6 ML SSS5 SSS5 gs sn6fs snn9f![ta3 [vRx"S#U<[{TR	554-5ef=f!,(df   Nb=f!,(df   g=f)$NTr�sinteractiveFc3�F># �UHnT"U5(dMUv� M g7fr�r�)r�rBrVs  �rar��revert.<locals>.<genexpr>z
s����=�}�!��!��A�A�}�s�!�	!c��gr�r�)rkr|s  rar��revert.<locals>.<lambda>}
s��r8c�>�UT;agUTR;agUS-nTHnURU5(dM g TRST"U5U4-5 g)Nros%s: %s
)rr�r�)rr��path_r�r�r�r6r�s    ����rar��revert.<locals>.badfn�
s]����5�=���3�<�<�'���t����A��|�|�E�*�*�������x��~�s�&;�;�<r8)�node1rrrr)rhrs
reverting %s
r�r�sforgetting %s
sundeleting %s
sno changes needed to %s
sfile not managed: %s
)�revert�add�remove�dropr��undelete�noop�unknownr�rLr
rs	no_backuprkrlrir�rjrmrnro)r/s#saving current version of %s as %s
r�)rirjrms(subrepository '%s' does not exist in %s!)>r%r[r.r�r�r�r)r�r�r�rfrr�r�alwaysr�r�r�r�r&r5r�r�r�r�rrr�rrr
r�rr0r�rrrr�rr/r�r��
backuppath�relpathr�r~r/rr�r�r�rWr��_performrevertr�revertr-rNrrr)@r6r6r�r;rhr�r�r�r�r\r<�
targetsubsr�r�r�r��kindr�r�r��_deletedrr�modadded�
dsmodified�dsadded�	dsremoved�localchanges�mergeaddrr�r��deladdedr�removunkr��
dsremovunk�actions�backupinteractiver�check�discard�dsmodifiedbackuprK�backupanddel�	disptabler�r��xlistr��dobackup�
absbakname�bakname�needdatar`�oplist�prefetch�sublistr&rrrVr�r�s@` `                                                          @@@rartrt\
s�	�������%�D����&�&�(�J�F��8�8�:�D�	����B��z���
�E��"�"�4�T�B�H�	
����t�}�}�3�3�D�9��h�h�~�u�5���D�z���M�M�$�d�+���=�t�}�}�=�=�
��x�x�z�z��'�'��+=�>�G��y�y��)���W�W�S�\��c�
�*�
	
=�	
=��x�x�� 1� 1�!�U� ;�<���e�#�!"�����E�#�J�=�
�"�"�4��/�A��k�k��!�T�4�t�"��G��k�k��A�k�6�G����C�!"�����E�#�J� � ��"�"�4��/�A��w�'�'�(���G�M�M�"���g�o�o�&���w���'���g�o�o�&�����w���'��G�M�M�"���5���>�!�J��G��I�%��/�L�'*�u�c�e�S�U�W�e�H�W��k�k��a�k�8�G��W�-�-�.�J��'�-�-�(�G��G�O�O�,�I�%��/�L�
�Y��(�(�E��� �I��y� �G��z�)�H��X��E�
�(�"�J��(�W�,�,�J��
�"�H�
�G������:��H�"���2�:��O�O�D�)�#�
�x��G��(�"�J��A��-�-�&�&�q�)�C����u�$��M�M�+�+�C�0�8�8�8��
�
�c�"�!��c�
���x�=���D��r�z�����%���X�%������C��=�=�*�*�3�/�5�5�5��	�	�#���	�5����C��}�}�&�&�s�+�1�1�1����C� ��	�G����5���C��Z�Z��_�F��w�w���v�&�&����S�!��	�8����U�
��C��Z�Z��_�F��w�w���v�&�&����s�#��	�Z��	�
�A�/�0�1���>�*�+��A�.�/�0��!�,�-�.��A�0�1�2��a� 2�3�4��A�:�;�<��q�!:�;�<�	
�����������8�8�L�!�!�18�8��8����0��%���5���y�)���x�x��%�%�"�7�+�L��w�y�)�7�3�
�g�i�(�'�2�
���+�-=�>�
�G�I�&��0�
�g�i�(�'�2�
�|�V�,�
�w�w�'��1�
�g�f�o�w�/�
�w�v���.�
���,�g�6�
���-�u�5��G�G�$�g�.�
�g�j�)�7�3�A!
�	�F!�����/�J�C���Z�Z��_�F�2;�-��|��s�X��e�#���$��L�L��%��$�'8�8�$�L�L��-�#�x�/�4�9�=�=��S��3J�3J�)0�);�);�B��)J�J�&(�g�g�o�o� *�$�)�)�'6�'�G��G�G� !�"I� J�#+�C�=�(�7�2C�"D�!E��$(�8�8�J�#7�#7�#.�$(�M�M�&�*�$E�$(�K�K��
�$C��x�x�
�+�+��:�:�U��I�I�c�H�S�M�&9�:����G�G�C�(�3�-�/�0��;2;�
0�J�x�x�
�#�#�7�H�3;�<�8�4�g�d�m�A�&�8�F�<��,�,�H� �+�+���@��W��1�q��q��@��J�
���'�'�)�Z�(�)�
��M�M�$�t�*�d�3�E����������	
��!����H�H�S�M�(�(����S�)��,0��4<�4F�4F�t�4L��"�w:����H=��A��2 ���+�+�C���c�h�h�j� 1�2�3�����A	:�9����s��h�"Ch�H	h�Ah�h� (h�.h�>Ah�Ah�Ah�>Ah�Lh�1f7�(h�+f<�Ah�Ag�"h�&h�7h�=g?	�?h�
h	�h�
h!c�^^^^^^&�TRR5up�TR5n
/nUU4SjnU4Sjn
UUUU4Sjn[R"TR
SS9nTSSH�nU(alTRR[S5T"U5-5nUS:Xa&U"SU5 TRRU5 McURU5 MvU"SU5 TRRU5 M� TS	SH|nU"U5 U(aYTRR[S
5T"U5-5nUS:XaU"S	U5 U
"U5 MXURU5 MkU"S	U5 U
"U5 M~ TSSH/nU"U5 U"SU5 TRRU5 M1 U	TR:Hm&UU&4Sjn[5nU(Ga�TS
SVs/sH
nUU;dMUPM nn[R"TU5n[R "TRSSSS9nSUlSUlSnX�:Xa&TRR'SS5(aSnOSnUS:Xa'[R("TSTR5UUS9nO&[R("TTR5SUUS9n[R*"U5n[-TRUUUS9unnUS:Xa[R."U5n[;U5unnUc
[5n[=5n[?UVs1sH/n[AU5(dMURBRE5iM1 sn5HnU"S
U5 M [5n UH�n[AU5(a�URBRE5n!URBRE5U;a[TRGU!5n"[RH"TRTU!5n#[JRL"U"U#5 UROU!5 U!U ;aU RQU!5 US:XaU"U!5 URSU5 M� URU5n$URWS5 U$(a#[RX"TRTUSSS9 AO1TS
SH%nU"S
U5 U"U5 U(dMU"U5 M' TSSHsnUU;aMU(a5TRR[S5T"U5-5nUS:waMGU"SU5 U"U5 TRR_U5 Mu TSSH~nU(a[TRR[S 5U-5nUS:XaU"SU5 U"U5 U"U5 MRURU5 MeU"SU5 U"U5 U"U5 M� [`Rb"TUT5n%TSSTSS-TS
S-H*nUU%;dMTRReU%UU5 M, gs snf![0R2a'n[0R4"[S5U-5eSnAf[0R6a'n[0R8"[S5U-5eSnAff=fs snf![0R2a/n[0R4"[ZR\"U55eSnAf[0R6a/n[0R8"[ZR\"U55eSnAff=f)!z�function that actually perform all the actions computed for revert

This is an independent function to let extension to plug in and react to
the imminent revert.

Make sure you have the working directory locked when calling this function.
c�l>�TUnTRXR5UR55 gr�)�wwriter�r�)r�r�r�r6s  ��ra�checkout� _performrevert.<locals>.checkout�s&���
��V�����A�w�w�y�"�(�(�*�-r8c��>�TRRSS5nTRRXS9 TR
R
U5 g![a N(f=f)Nr�r�r�)r6ryr�r�r5r.�
set_untracked)r�r4r6s  �ra�doremove� _performrevert.<locals>.doremove�s\���	��G�G�&�&��8J�K�E��I�I� � �� �0�	
�
�
�#�#�A�&���	��	�s�5A�
A!� A!c�>�TUnTRR(dU(d+TRRTUST"U5-5 gg)Nr
)r6r�r5)r�r�r�r�r�r6r�s   ����ra�
prntstatusmsg�%_performrevert.<locals>.prntstatusmsg�s@����a����7�7�?�?�%��G�G�N�N�7�6�?�1�-����;�<�#(r8T)�cachedr�rs(forget added file %s (Yn)?$$ &Yes $$ &Norks(remove added file %s (Yn)?$$ &Yes $$ &Norlc�8>�TRRUTS9$)N)�
reset_copy)r.�set_tracked)r�r6r�s ��ra�normal�_performrevert.<locals>.normal�s����}�}�(�(��j�(�I�Ir8rir�srevert.interactive.)r�r�r�sapplyr�s!revert.interactive.select-to-keepskeepsdiscardNr5)r�r�r�r
r�rjs#add new file %s (Yn)?$$ &Yes $$ &Norms,add back removed file %s (Yn)?$$ &Yes $$ &No)3r.r�r�r#�pathauditorr�r6r�rr�r�r
r�r)r&r"r	r
rryr
rr��reversehunksrrrgrrr�rr�r�r�r�rrqr/rr�r�r�rrr+r%r,r�rrr�)'r6r�r�r�r�rr\rKr�r�r��excluded_filesr�r�r��
audit_pathr�r�r�r��torevertrVrCr�r
rEr�rhrF�unusedalsorestorerPrQr�r�r�r�rSrr�s'`````                                 @rarsrs�s����"���&�&�(�J�F��8�8�:�D��N�.�'�=�=�
�%�%�d�i�i��=�J�
�Y�
��
"����W�W�)�)��=�>��!��L��F���{��i��+��
�
�+�+�A�.��%�%�a�(��)�Q�'��M�M�'�'��*�#��Y�
��
"���1�
���W�W�)�)��=�>��!��L��F���{��i��+�����%�%�a�(��)�Q�'��Q�K�#��W�
�a�
 ���1�
��g�q�!��
�
�#�#�A�&�!��t�{�{�"�J�J�"%����&�y�1�!�4�P�4�!���8O�A�4��P����t�X�.���(�(��G�G���/�	
�� �������	��>��w�w�!�!��!E���$�	�&�	��� ��:�:�d�D�#�(�(�*�a�h�G�D��:�:�d�C�H�H�J��a�h�G�D� �+�+�D�1��
	I�'����)�5�I��L�F�D��J�&��+�+�F�3��9G�v�8N�5�"�$5����u�H�
�Z���f�J�f���q�	�,����*�*�,�f�J�K�A��)�Q�'�L�����A��a�y�y��h�h�'�'�)���8�8�$�$�&�(�2�!�Z�Z��_�F�%�0�0����$��D�G��M�M�&�'�2��O�O�C�(��e�#��I�I�c�N� �G�+� ��
�
�G�G�B�K���'�'�)��
����
��
>��#�#�D�G�G�T�2�q�$�G�

���#�A�&�A��)�Q�'��Q�K��v��q�	�	'��V�_�Q�
���*�*����W�W�)�)��8�9�H�Q�K�G��F���{���f�a� �����
�
�!�!�!�$� ��[�
!�!�
$����W�W�)�)��A�B�Q�F��F���{��k�1�-�����q�	��%�%�a�(��+�q�)��Q�K��1�I�%� �
�
�t�F�|�S�
1�F�	�����W�[�1�!�4�4�w�y�7I�!�7L�L�	
�
��;��M�M���v�a�y�!�,�	M��iQ��@�$�$�	H��"�"�1�%?�#@�3�#F�G�G���*�*�	I��"�"�1�%@�#A�C�#G�H�H��	I��K��,�(�(�
>��&�&�x�'7�'7��'<�=�=���.�.�
>��&�&�x�'7�'7��'<�=�=��
>�s`�
Y>�Y>�85Z�[:�3[:�="[?�[7�"Z9�9[7�"[2�2[7�?^�*\=�=^�*]>�>^c��[RH�nUR(d)U(aUR(dUR(aM?URU5(dMW[R"UR5UR5S9e [RH�nUR(a@U(aUR(d(URS:XaU(dUR(aMVURU5(dMn[R"UR5UR5S9e g)z�Look for an unfinished multistep operation, like graft, and abort
if found. It's probably good to check this right before
bailifchanged().
r�mergeN)r��_unfinishedstates�
_clearable�_allowcommit�_reportonly�isunfinishedrrr�r	�_opname)r6r��	skipmerger*rBs     rar�r�xs����+�+������5�-�-�� � �����d�#�#��"�"�5�9�9�;�U�Z�Z�\�B�B�,��
'�
'������1�>�>��	�	�X�%�)��}�}���>�>�$����"�"�1�5�5�7�����:�:�(r8c�H�[RHpnUR(aMUR(aM)UR	U5(dMA[
R"UR5UR5S9e [RH�nURS:XdUR(aM&UR(dM9UR	U5(dMQ[R"URRUR55 M� g)zSCheck for unfinished operations (as above), and clear the ones
that are clearable.
rr�N)r�r�r�r�r�rrr�r	r�r/r%r0r�_fname)r6r*rBs   ra�clearunfinishedr��s����+�+����������E�$6�$6�t�$<�$<��"�"�5�9�9�;�U�Z�Z�\�B�B�	,��
'�
'���9�9�� �A�M�M���<�<�<�A�N�N�4�0�0��K�K����
�
�a�h�h�/�0�	(r8c�f�[RHnURU5(dMUs $ g)zEChecks for unfinished operations and returns statecheck object
for itN)r�r�r�)r6r*s  ra�getunfinishedstater��s/���+�+�����d�#�#��L�,�r8c��[S5n[RHBnUR(dMUR	U5(dM.XR5-S4s $ USR
SSSS9(aU[S5-S4$g)aMCheck for an unfinished operation and return the command to finish
it.

statemod._unfinishedstates list is checked for an unfinished operation
and the corresponding message to finish it is generated if a method to
continue is supported by the operation.

Returns a (msg, warning) tuple. 'msg' is a string and 'warning' is
a boolean.
scontinue: %sTNF)�missingrr�s	hg commit�NN)rr�r��
_continueflagr��continuemsg�dirty)r6�contmsgr*s   ra�
howtocontinuer��s����� �G��+�+���"�"�����d�#�#��.�.�0�0�$�6�6�	,�
�D�z����E�%��@���<��(�%�/�/�r8c��[U5upUbEU(aURRSU-5 gURRSU-5 gg)z�Inform the user about the next action after completing hg resolve

If there's a an unfinished operation that supports continue flag,
howtocontinue will yield repo.ui.warn as the reporter.

Otherwise, it will yield repo.ui.note.
Nr�)r�r6r�r~)r6r�r�s   ra�checkafterresolvedr��sE��!��&�L�C�
����G�G�L�L��3��'��G�G�L�L��3��'�	r8c�|�[U5nSnUS(aUSn[R"[S5U-US9e)z�Raise an abort suggesting how to properly continue if there is an
active task.

Uses howtocontinue() to find the active task.

If there's no task (repo.ui.note for 'hg commit'), it does not offer
a hint.
Nr
rsno %s in progressr)r�rrr)r6�taskr�r	s    ra�wrongtooltocontinuer��sA��
�$��E��D��Q�x��Q�x��
�
�
�1�1�2�T�9��
E�Er8c	��^�UR5(d[R"[S55e[	TU5nURS5nUc[R"[S55e[U5S:�aTUSR5nOTSnSnU(Ga�UVs/sHnTUR5PM nnSnUVs/sHnTUR5(aMUPM! n	nU	(aJTRR[S	5S
RU4SjU	55-[S5S
9 Sn[TRR!U55n
U
[U5-
(a&TRR[S55 SnU(a�TR#5 TR%5 [&R("U5 TRSU5Vs/sHo�R+5PM nn[,R."TRTUSS9 SSS5 SSS5 U(dTSn[&R("U5 UR1[S55 UR1[S5UR35SS-5 UR55 gs snfs snfs snf!,(df   N�=f!,(df   N�=f)zOabort the interrupted graft and rollbacks to the state before interrupted
graftsno interrupted graft to abortsnewnodesNs$cannot abort using an old graftstaterr�FTs%cannot clean up public changesets %s
rac3�@># �UHn[TU5v� M g7fr�)re)r�r r6s  �rar��abortgraft.<locals>.<genexpr>s����?�Y��U�4��7�^�^�Y�s�s see 'hg help phases' for detailsrs;new changesets detected on destination branch, can't strip
r�)rsgraft aborted
sworking directory is now at %s
�)r�rrr�readgraftstaterfrr�r�r��mutabler6r�rr�r�descendantsr�r�r(�clean_updater�r&rr5r�delete)r6r6�
graftstate�	statedata�newnodes�startctx�cleanupr rQ�	immutable�desc�strippointss `          ra�
abortgraftr��s^�����������q�!A�B�C�C��t�Z�0�I��}�}�[�)�H����k�k�!�C�D�E�E��8�}�q������$�'�'�)����:���G��+3�4�8�a�D��G�K�K�M�8��4��� (�B��1��Q����0A�Q��	�B���G�G�L�L��;�<��*�*�?�Y�?�?�@��:�;�
�
�
�G��4�>�>�-�-�h�7�8���#�h�-���G�G�L�L��-��
��G������t�y�y�{��%�%�h�/�'+�h�h�}�h�&G��&G��F�F�H�&G������T�W�W�d�K��F�
 +�����:�����h�'��I�I�a�"�#�$��I�I�a�3�4�x�|�|�~�c�r�7J�J�K�������Q5��C��0� +�{����sH�.K�K�3K�K#�+K�<K
�#K�8K#�
K�
K 	�K#�#
K1c��UR5$![Ra0 URRS5R	5nSU0s$f=f)zDread the graft state file and return a dict of the data stored in it�
graftstatesnodes)r"r�CorruptedStater0r�)r6r��nodess   rar�r�%sO��
!���� � �����!����
�
�m�,�7�7�9���%� � �!�s��AA�Ac��UR5 [R"US5n[XU5sSSS5 $!,(df   g=f)z/abort logic for aborting graft using 'hg abort'r�N)r�r��cmdstater�)r6r6r�s   ra�hgabortgraftr�1s1��	
�����&�&�t�]�;�
��"�J�/�
���s	�#>�
Ac��US:XagU(aSSKJn URXXE5$UR(agUb|US:�av[UR55n
X�:XaUR[S55 gU
S:�aUR[S	55 gUR[S
55 gURSS5(dUR[S
55 g![RaGn[S5[R"U5-nURn	[R"X�S9eSnAff=f)a�Run after a changegroup has been added via pull/unbundle

This takes arguments below:

:modheads: change of heads by pull/unbundle
:optupdate: updating working directory is needed or not
:checkout: update destination revision (or None to default destination)
:brev: a name, which might be a bookmark to be activated after updating

return True if update raise any conflict, False otherwise.
rFr
r�snot updating: %srNs3(run 'hg heads' to see heads, 'hg merge' to merge)
s5(run 'hg heads .' to see heads, 'hg merge' to merge)
s(run 'hg heads' to see heads)
r�supdate.requiredests((run 'hg update' to get a working copy)
)r�r��
updatetotallyr�UpdateAbortrr2r%r	�quietr��branchheadsr5ry)r6r6�modheads�	optupdater��brevr�rr�r	�currentbranchheadss           ra�postincomingr�8s2���1�}����	4��#�#�B�h�=�=�

�x�x���
�	�(�Q�,� ��!1�!1�!3�4���)��I�I��I�J�
�� �!�
#��I�I��K�L�
��
�I�I�a�:�;�<���]�]�;�(=�
>�
>�
�	�	�!�@�A�B���)� � �	4��'�(�:�+B�+B�4�+H�H�C��9�9�D��#�#�C�3�3��	4�s�C,�,E�AE�Ec�(�U(deSSKJn UR5 UH�nURX5n[R
"XU5n[
U[R5(a'[R"[S5[S5S9eSU-nSn	[
U[R5(dS[R"U5-n	UR!U	5n
[R""UUU
UUS	9nS
S
S
5 [R("W5n
M� S
S
S
5 W
$!,(df   N2=f![R$a0n[R&"[S5X\4-[S5S9eS
nAff=f!,(df   W
$=f)
z2utility for `hg unbundle` and `hg debug::unbundle`r
r�s3packed bundles cannot be applied with "hg unbundle"s$use "hg debugapplystreamclonebundle"rsbundle:�unbundlesunbundle
%s)�source�urlNs%s: unknown bundle feature, %ssEsee https://mercurial-scm.org/wiki/BundleFeature for more information)r�r�r��openpathr�
readbundler�r+�streamcloneapplierrrgrr�
unbundle20r3�hidepasswordr��applybundle�BundleUnknownFeatureErrorr�combinechangegroupresults)r6r6�fnames�unbundle_sourcer�rRr��genr��txnnamer?�op�excr�s              ra�unbundle_filesr�csm���M�6��	
�����E����B�&�A��%�%�b�U�3�C��#�{�=�=�>�>��&�&��)���B�C����u�$�C�
�%��!�#�w�'9�'9�:�:�-��0D�0D�S�0I�I�G��%�%�g�.�"� �,�,����.���B�/�"�8�8��<�H�C�
�F�O�%/�.���2�2�
��k�k��7�8�E�<�G��'�����
��3
��F�O�sU�A9F�AD;�%D*�>D;�F�*
D8�4D;�7F�8D;�;E?�+E:�:E?�?F�
F)rh�Dict[AnyStr, Any]rirrdzOptional[AnyStr])rhr�rnrrozIterable[AnyStr]rdrv)r6�uimod.uirh�Dict[str, Any]rdr)rhr�rdrvr�)r��istatus.Statusrdr�)F)T)rrerd�Optional[bytes]r)r6r�rh�Dict[bytes, Any]rdr�)FNNr8r�)NNNN)rOre)�wb)rOrer|zLiteral['rb', 'wb']rdr)rhr�)shg-%h.patchFNN)FNN)rhr�)r8)NNr8F)FN)FF)r6rr�zstatemod.cmdstaterdr�)r�)��
__future__rr�r�r�r]rr6rzrrrrrr	r
rr�i18nrr�rrr�
thirdpartyrr�rrrrrr�rrrrrrr�rr(rr�r r!r"r#r$r%r&r'r(r)r*r�r+r,r-r.r/r0r��utilsr1r2r3�revlogutilsr4r��
interfacesr5�istatusr6�uimodr�
dryrunopts�confirmopts�
remoteopts�walkopts�
commitopts�commitopts2�commitopts3�
formatteropts�templateopts�logoptsrC�
diffwsopts�	diffopts2�
mergetoolopts�similarityopts�subrepoopts�debugrevlogoptsr8rlrqr|r�r�r�r�r�r�r�r�rYrarcr�r�rBr�r�r�r�rrr�rrr&r1r7r?rErXrZr
r]rr�r�rr!r r"r1r<r=rErIrUrZr]r_rqrvr�r�r�r�r�r�r�r�r�r�r�r+r%rr2rPr3r]r_rtrs�hooks�
outgoinghooks�summaryhooks�summaryremotehooksr�r�r�r�r�r�r�r�r�r�r�r�r8ra�<module>rs��#����	�	�
�
�
�
����
�
������������B�������=�=��

�:�t�Q�K�L�M��
�
	�*�d�A�<�=�>���

�6�3��7�8�!�F�)�D����	�
9�:�	�&�	��	���	�
K�L�	��
�&	
��
�	�
6�7�	�*�
��	
��
�	�
6�7�	�*�
����$
�:�s�A�;�<�a��j�I�	�:�s�A�>�?��7��L��
�	
���	�
5�6�	�'�
��	
���	�
3�4�	�'�
����$
�>�4��#L�!M�N�	�>�4��#J�!K�L���
�;��Q�7�8�!�K�.�I��
�	���	�
9�:�	�(���
�;��Q�7�8�!�K�.�I�	��
�8�T�1�]�+�,�	�6�4��:�;�<�	�8�S�!�@�A�1�V�9�M�	�<��q�!6�7�8��'�4��F�G�H�	�8�T�1�5�6�7�
����
�7�D�!�6�7�8����	�
=�>�	�	�)�T�1�K�L�M��*�d�A�=�>�?�
��	
���	�
4�5�	�	
���	�
8�9�	�	
���	�
5�6�	�	
���	�
0�1�	�'�
�:

�k�4��#L�!M�N����
�Q�
�		
�

�j�$��"K� L�M����
���
�3�4�
�f�I�	
�

�g�t�Q�J�K�L����
�7�8�
�f�I�	
���
�D
�7�C��0�1�1�W�:�>��
�	
���	�
:�;�	�-������k�4��+J�)K�L�M��
�<���"3� 4�5�	�;��q�!1�2�3��&�#�q�3�4�5���K�
��
������02�
�2��2�
�2�
�	2��6
D�&�
(�
3��
� B�(�&Z�z.�4`3�`3�F5'�p.����t��LB�LB��LB�^�$$�N-�"dO�N
�,�&�,%�&:=��@�"�&$�" �0D�NB�"�

�
�*26�
��
�.�
�
�
� H
�V
B�k�`
��������X�z����**�ZL��4,���	
�
�(
�VF��@�D�N@�b�J-�bMQ�T�n9��&:�z^.�^.�B@�D	(�q�h��
�
�#�>�B�"F�  �F;L�|D�y�F
�
�J-�`�
�
��
��z�z�|���Z�Z�\��;�:1�"��,
(� 
F� =
�@	!�

�	!�!�	!��	!�0�(�V)r8