§
    	^µcpO  ã                   óÐ  — d Z ddlZddlZddlZddlmZ ddlmZmZ ddl	m
Z
mZmZmZmZmZmZmZmZmZmZmZmZ ddlmZmZmZ i Z ej        e¦  «        ZdZdZdZd	Z eej!        iZ"d
„ Z#d„ Z$d„ Z%d„ Z&d„ Z'd„ Z(d„ Z)d„ Z*d„ Z+d„ Z,d„ Z- G d„ d ej.        dd¦  «        ¦  «        Z/ G d„ d¦  «        Z0dZ1 edddgd„ ej2        D ¦   «         z   dej3        ¬ ¦  «        d!„ ¦   «         Z4dS )"z¡track previous positions of bookmarks (EXPERIMENTAL)

This extension adds a new command: `hg journal`, which shows you where
bookmarks were previously located.

é    N)Ú_)ÚbinÚhex)Ú	bookmarksÚcmdutilÚdispatchÚencodingÚerrorÚ
extensionsÚhgÚ	localrepoÚlockÚ
logcmdutilÚpycompatÚ	registrarÚutil)ÚdateutilÚprocutilÚ
stringutils   ships-with-hg-cores   bookmarks
   wdirparentc                 óZ  — t          j        t          dt          ¦  «         t          j        t          j        dt          ¦  «         t          j        t          j	        dt          ¦  «         t          j        t          dt          ¦  «         t          j        t          dt          ¦  «         d S )Ns
   runcommands   _writeó   dirstates	   postshares	   copystore)r   Úwrapfunctionr   Ú
runcommandr   ÚbmstoreÚrecordbookmarksÚwrapfilecacher   ÚlocalrepositoryÚwrapdirstater   ÚwrappostshareÚunsharejournal)Úuis    ú//usr/lib/python3/dist-packages/hgext/journal.pyÚextsetupr#   D   s€   € ÝÔ�H mµZÑ@Ô@Ð@ÝÔ�IÔ-¨y½/ÑJÔJÐJÝÔÝÔ! ;µñô ð õ Ô�B ­mÑ<Ô<Ð<ÝÔ�B ­nÑ=Ô=Ð=Ð=Ð=ó    c                 óæ   — |                      ¦   «         rZt          |¦  «        |_        |j                             d¦  «         t          j        |d¦  «        \  }}|rt          ||¦  «         d S d S d S )Nó   namejournalr   )ÚlocalÚjournalstorageÚjournalÚ_wlockfreeprefixÚaddr   ÚisfilecachedÚ_setupdirstate)r!   ÚrepoÚdirstateÚcacheds       r"   Ú	reposetupr1   N   sƒ   € Ø‡z‚z�|„|ð 	+Ý% dÑ+Ô+ˆŒØÔ×!Ò! .Ñ1Ô1Ð1å$Ô1°$¸ÑDÔDÑˆ�&Øð 	+õ ˜4 Ñ*Ô*Ð*Ð*Ð*ð	+ð 	+ð
	+ð 	+r$   c                 ó6   — t          j        |Ž   | ||||g|¢R Ž S )z;Track the command line options for recording in the journal)r(   Úrecordcommand)ÚorigÚluir.   ÚcmdÚfullargsÚargss         r"   r   r   [   s.   € åÔ  (Ð+Ð+Øˆ4��T˜3 Ð0¨4Ð0Ð0Ð0Ð0r$   c                 óT   — | j         |_        |                     dt          ¦  «         d S ©Nó   journal)r)   r(   ÚaddparentchangecallbackÚrecorddirstateparents)r.   r/   s     r"   r-   r-   a   s)   € Ø"œl€HÔØ×$Ò$ ZÕ1FÑGÔGÐGÐGÐGr$   c                 óf   —  | |¦  «        }t          j        |d¦  «        rt          ||¦  «         |S )z5Make journal storage available to the dirstate objectr)   )r   Úsafehasattrr-   )r4   r.   r/   s      r"   r   r   g   s9   € àˆt�D‰zŒz€HÝÔ˜˜iÑ(Ô(ð 'Ý�t˜XÑ&Ô&Ð&Ø€Or$   c                 ó<  — t          |¦  «        }t          |¦  «        }t          j        | d¦  «        rh|d         | j        j        k    r
|dd…         n|}|d         | j        j        k    r
|dd…         n|}| j                             t          d||¦  «         dS dS )z3Records all dirstate parent changes in the journal.r(   é   Nó   .)Úlistr   r?   Ú_nodeconstantsÚnullidr(   ÚrecordÚwdirparenttype)r/   ÚoldÚnewÚ	oldhashesÚ	newhashess        r"   r=   r=   o   s°   € å
ˆs‰)Œ)€CÝ
ˆs‰)Œ)€CÝÔ˜Ð"2Ñ3Ô3ð 
à" 1œv¨Ô)@Ô)GÒGÐG�C˜˜˜”G�GÈSˆ	Ø" 1œv¨Ô)@Ô)GÒGÐG�C˜˜˜”G�GÈSˆ	ØÔ×&Ò&Ý˜D )¨Yñ	
ô 	
ð 	
ð 	
ð 	
ð	
ð 
r$   c                 ó4  — |j         }t          j        |d¦  «        rqt          j        |¦  «        }|                     ¦   «         D ]H\  }}|                     ||j        ¦  «        }||k    r"|j         	                    t          |||¦  «         ŒI | ||¦  «        S )z,Records all bookmark changes in the journal.r)   )Ú_repor   r?   r   r   ÚitemsÚgetrE   r)   rF   Úbookmarktype)r4   ÚstoreÚfpr.   ÚoldmarksÚmarkÚvalueÚoldvalues           r"   r   r   }   s™   € àŒ;€DÝÔ˜˜iÑ(Ô(ð IÝÔ$ TÑ*Ô*ˆØ Ÿ;š;™=œ=ð 	Ið 	I‰KˆD�%Ø—|’| D¨$¬+Ñ6Ô6ˆHØ˜Ò Ð Ø”×#Ò#¥L°$¸À%ÑHÔHÐHøØˆ4��r‰?Œ?Ðr$   c                 ó²   — 	 t          | j                             d¦  «                             ¦   «         ¦  «        S # t          $ r t          ¦   «         cY S w xY w)z,A set of shared features for this repositoryó   shared)ÚsetÚvfsÚreadÚ
splitlinesÚFileNotFoundError)r.   s    r"   Ú_readsharedfeaturesr^   Š   sW   € ðÝ�4”8—=’= Ñ+Ô+×6Ò6Ñ8Ô8Ñ9Ô9Ð9øÝð ð ð Ý‰uŒuˆˆˆðøøøs   ‚8; »AÁAc               /   ó‚  K  — |                      dt          ¦  «        }d„ | D ¦   «         } i }t          | ¦  «        D ]+\  }}	 t          |¦  «        ||g||<   Œ# t          $ r Y Œ(w xY w|rV ||                     ¦   «         ¦  «        \  }}}|V — 	 t          |¦  «        ||         d<   n# t          $ r ||= Y nw xY w|°TdS dS )z‹Given a set of sorted iterables, yield the next entry in merged order

    Note that by default entries go from most recent to oldest.
    Úorderc                 ó,   — g | ]}t          |¦  «        ‘ŒS © )Úiter)Ú.0Úits     r"   ú
<listcomp>z%_mergeentriesiter.<locals>.<listcomp>˜   s   € Ð.Ð.Ð.˜b•�b‘”Ð.Ð.Ð.r$   r   N)ÚpopÚmaxÚ	enumerateÚnextÚStopIterationÚvalues)Ú	iterablesÚkwargsr`   Úiterable_mapÚkeyre   rU   s          r"   Ú_mergeentriesiterrq   ’   s'  è è € ð
 �JŠJ�w¥Ñ$Ô$€EØ.Ð. IÐ.Ñ.Ô.€Ið
 €LÝ˜YÑ'Ô'ð ð ‰ˆˆRð	Ý!% b¡¤¨3°Ð 3ˆL˜ÑÐøÝð 	ð 	ð 	àˆDð	øøøð ð "Ø˜˜|×2Ò2Ñ4Ô4Ñ5Ô5‰ˆˆs�BØˆˆˆð	"Ý#'¨¡8¤8ˆL˜Ô˜aÑ Ð øÝð 	"ð 	"ð 	"à˜SÐ!Ð!Ð!ð	"øøøð ð "ð "ð "ð "ð "s$   ÁAÁ
A$Á#A$ÂB( Â(B8Â7B8c                 óú   — |                      ¦   «         5   | ||fi |¤Ž |                     dd¦  «        5 }|                     d¦  «         ddd¦  «         n# 1 swxY w Y   ddd¦  «         dS # 1 swxY w Y   dS )z<Mark this shared working copy as sharing journal informationrX   ó   as   journal
N)ÚwlockrZ   Úwrite)r4   Ú
sourcerepoÚdestreporn   rR   s        r"   r   r   ¯   s  € à	�ŠÑ	Ô	ð #ð #ØˆˆZ˜Ð,Ð, VÐ,Ð,Ð,Ø�\Š\˜) TÑ*Ô*ð 	#¨bØ�HŠH�\Ñ"Ô"Ð"ð	#ð 	#ð 	#ñ 	#ô 	#ð 	#ð 	#ð 	#ð 	#ð 	#ð 	#øøøð 	#ð 	#ð 	#ð 	#ð#ð #ð #ñ #ô #ð #ð #ð #ð #ð #ð #ð #øøøð #ð #ð #ð #ð #ð #s4   •!A0¶AÁA0ÁA	ÁA0ÁA	Á A0Á0A4Á7A4c                 ó|  ‡
— |j         |k    �r#|                     ¦   «         �rt          j        |d¦  «        rùt	          j        |¦  «        }t          |¦  «        Š
|rÔ‰
dhk    rÍ|j                             d¦  «        r2|j         	                    d¦  «        }t          j
        ||dz   ¦  «         |j        }|                     |j        dd¬¦  «        }ˆ
fd„|                     |j        d¬	¦  «        D ¦   «         }t          ||t          ¬
¦  «        D ]}	|                     |j        |	¦  «         Œ | |||¦  «        S )z9Copy shared journal entries into this repo when unsharingr)   r;   r&   s   .baks   namejournal.bakF)ÚfilenameÚ_newestfirstc              3   ó^   •K  — | ]'}t                                |j        ¦  «        ‰v ¯#|V — Œ(d S ©N)ÚsharednamespacesrO   Ú	namespace)rd   ÚeÚsharedfeaturess     €r"   ú	<genexpr>z!unsharejournal.<locals>.<genexpr>Ë   sJ   øè è € ð ð àÝ#×'Ò'¨¬Ñ4Ô4¸ÐFÐFð àFÐFÐFÐFðð r$   )rz   )r`   )ÚpathÚsharedr   r?   r   Úsharedreposourcer^   rZ   ÚexistsÚjoinÚrenamer)   Ú_openrq   ÚminÚ_write)r4   r!   r.   ÚrepopathÚ
sharedrepoÚjournalpathÚstorager'   rƒ   Úentryr€   s             @r"   r    r    ·   s]  ø€ ð 	Œ	�XÒÑØ�KŠK‰MŒMñ 	åÔ˜T 9Ñ-Ô-ð 	õ Ô(¨Ñ.Ô.ˆ
Ý,¨TÑ2Ô2ˆØð 	0˜.¨J¨<Ò7Ð7ð Œx�Š˜~Ñ.Ô.ð @Ø"œhŸmšm¨NÑ;Ô;�Ý”˜K¨°wÑ)>Ñ?Ô?Ð?Ø”lˆGØ—M’MØ”Ð#5ÀEð "ñ ô ˆEðð ð ð à Ÿš z¤~ÀE˜ÑJÔJðñ ô ˆFõ
 +¨5°&ÅÐDÑDÔDð 0ð 0�Ø—’˜tœx¨Ñ/Ô/Ð/Ð/àˆ4��D˜(Ñ#Ô#Ð#r$   c                   óN   — e Zd ZdZed„ ¦   «         Zd„ Z ej        e¦  «        Z	dS )Újournalentrya¬  Individual journal entry

    * timestamp: a mercurial (time, timezone) tuple
    * user: the username that ran the command
    * namespace: the entry namespace, an opaque string
    * name: the name of the changed item, opaque string with meaning in the
      namespace
    * command: the hg command that triggered this record
    * oldhashes: a tuple of one or more binary hashes for the old location
    * newhashes: a tuple of one or more binary hashes for the new location

    Handles serialisation from and to the storage format. Fields are
    separated by newlines, hashes are written out in hex separated by commas,
    timestamp and timezone are separated by a space.

    c           	      ó|  — |                      d¦  «        \  }}}}}}}|                      ¦   «         \  }	}
t          |	¦  «        t          |
¦  «        }
}	t          d„ |                      d¦  «        D ¦   «         ¦  «        }t          d„ |                      d¦  «        D ¦   «         ¦  «        } | |	|
f||||||¦  «        S )Nó   
c              3   ó4   K  — | ]}t          |¦  «        V — Œd S r|   ©r   ©rd   Úhashs     r"   r�   z+journalentry.fromstorage.<locals>.<genexpr>ú   ó(   è è € ÐFÐF¨�#˜d™)œ)ÐFÐFÐFÐFÐFÐFr$   ó   ,c              3   ó4   K  — | ]}t          |¦  «        V — Œd S r|   r•   r–   s     r"   r�   z+journalentry.fromstorage.<locals>.<genexpr>û   r˜   r$   )ÚsplitÚfloatÚintÚtuple)ÚclsÚlineÚtimeÚuserÚcommandr~   ÚnamerJ   rK   Ú	timestampÚtzs              r"   Úfromstoragezjournalentry.fromstorageí   sÒ   € ð �JŠJ�uÑÔñ	
ØØØØØØØàŸ
š
™œ‰ˆ	�2Ý˜iÑ(Ô(­#¨b©'¬'�2ˆ	ÝÐFÐF°	·²ÀÑ0EÔ0EÐFÑFÔFÑFÔFˆ	ÝÐFÐF°	·²ÀÑ0EÔ0EÐFÑFÔFÑFÔFˆ	ØˆsØ˜ˆOØØØØØØñ
ô 
ð 	
r$   c           	      óV  — d                      t          t          j        | j        ¦  «        ¦  «        }d                      d„ | j        D ¦   «         ¦  «        }d                      d„ | j        D ¦   «         ¦  «        }d                      || j        | j        | j	        | j
        ||f¦  «        S )z bytes representation for storageó    r™   c                 ó,   — g | ]}t          |¦  «        ‘ŒS rb   ©r   r–   s     r"   rf   z*journalentry.__bytes__.<locals>.<listcomp>	  ó   € ÐDÐDÐD¨T�s 4™yœyÐDÐDÐDr$   c                 ó,   — g | ]}t          |¦  «        ‘ŒS rb   r«   r–   s     r"   rf   z*journalentry.__bytes__.<locals>.<listcomp>
  r¬   r$   r“   )r†   Úmapr   Úbytestrr¥   rJ   rK   r¢   r£   r~   r¤   )Úselfr¡   rJ   rK   s       r"   Ú	__bytes__zjournalentry.__bytes__  sž   € à�yŠy��XÔ-¨t¬~Ñ>Ô>Ñ?Ô?ˆØ—I’IÐDÐD°T´^ÐDÑDÔDÑEÔEˆ	Ø—I’IÐDÐD°T´^ÐDÑDÔDÑEÔEˆ	Ø�zŠzàØ”	Ø”Ø”Ø”	ØØðñ

ô 

ð 
	
r$   N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úclassmethodr§   r±   r	   Ú	strmethodÚ__str__rb   r$   r"   r‘   r‘   Ö   sV   € € € € € ðð ð" ð
ð 
ñ „[ð
ð0
ð 
ð 
ð" !ˆhÔ  Ñ+Ô+€G€G€Gr$   r‘   z9timestamp user command namespace name oldhashes newhashesc                   óz   — e Zd ZdZdZdZd„ Zed„ ¦   «         Ze	d„ ¦   «         Z
d„ Zd„ Zd	„ Zd
„ Zdd„Zd„ Zdd„ZdS )r(   ae  Storage for journal entries

    Entries are divided over two files; one with entries that pertain to the
    local working copy *only*, and one with entries that are shared across
    multiple working copies when shared using the share extension.

    Entries are stored with NUL bytes as separators. See the journalentry
    class for the per-entry structure.

    The file format starts with an integer version, delimited by a NUL.

    This storage uses a dedicated lock; this makes it easier to avoid issues
    with adding entries that added when the regular wlock is unlocked (e.g.
    the dirstate).

    rb   Nc                 ó.  — t          j        ¦   «         | _        |j        | _        |j        | _        d x| _        | _        |                     ¦   «         r>t          |¦  «        }t          j
        |¦  «        }|�d|v r|j        | _        || _        d S d S d S d S r:   )r   Úgetuserr¢   r!   rZ   r€   Ú	sharedvfsrƒ   r^   r   r„   )r°   r.   ÚfeaturesrŒ   s       r"   Ú__init__zjournalstorage.__init__/  s¡   € ÝÔ$Ñ&Ô&ˆŒ	Ø”'ˆŒØ”8ˆŒð 04Ð3ˆÔ˜dœnØ�;Š;‰=Œ=ð 	/Ý*¨4Ñ0Ô0ˆHÝÔ,¨TÑ2Ô2ˆJØÐ%¨*¸Ð*@Ð*@Ø!+¤�”Ø&.�Ô#Ð#Ð#ð	/ð 	/ð &Ð%Ð*@Ð*@r$   c                 ó¸   — d                      t          t          j        t          j        ¦  «        ¦  «        }d|v r|                     d¦  «        d         dz   }|S )Nr©   r“   r   s    ...)r†   r®   r   Ú
shellquoter(   Ú_currentcommandÚ	partition)r°   Ú
commandstrs     r"   r£   zjournalstorage.command>  sX   € à—Y’YÝ•Ô#¥^Ô%CÑDÔDñ
ô 
ˆ
ð �JÐÐà#×-Ò-¨eÑ4Ô4°QÔ7¸'ÑAˆJØÐr$   c                 ó   — || _         dS )z:Set the current hg arguments, stored with recorded entriesN)rÁ   )rŸ   r7   s     r"   r3   zjournalstorage.recordcommandH  s   € ð
 'ˆÔÐÐr$   c                 ó8   — |€dS  |¦   «         }|�|j         sdS |S )zoReturns the lock if it's held, or None if it's not.

        (This is copied from the localrepo class)
        N)Úheld)r°   ÚlockrefÚls      r"   Ú_currentlockzjournalstorage._currentlockO  s.   € ð
 ˆ?Ø�4ØˆG‰IŒIˆØˆ9˜AœFˆ9Ø�4Øˆr$   c           	      ój  — |                       | j        ¦  «        �!t          j        t	          d¦  «        ¦  «        ‚t	          d¦  «        |j        z  }	 t          j        |dd|¬¦  «        }n­# t          j        $ r›}| j         	                    t	          d¦  «        ||j
        fz  ¦  «         t          j        |d| j                             dd	¦  «        |¬¦  «        }| j         	                    t	          d
¦  «        |j        z  ¦  «         Y d}~nd}~ww xY wt          j        |¦  «        | _        |S )z"Create a lock for the journal fileNs%   journal lock does not support nestings   journal of %ss   namejournal.lockr   )Údescs"   waiting for lock on %s held by %r
s   uis   timeouts   got lock after %s seconds
)rÉ   Ú_lockrefr
   ÚAbortr   Úbaser   ÚLockHeldr!   ÚwarnÚlockerÚ	configintÚdelayÚweakrefÚref)r°   rZ   rË   rÈ   Úinsts        r"   Újlockzjournalstorage.jlock[  s=  € à×Ò˜Tœ]Ñ+Ô+Ð7Ý”+�aÐ HÑIÔIÑJÔJÐJÝÐ!Ñ"Ô" S¤XÑ-ˆð	FÝ”	˜#Ð2°A¸DÐAÑAÔAˆAˆAøÝŒ~ð 	Fð 	Fð 	FØŒG�LŠLÝÐ8Ñ9Ô9¸TÀ4Ä;Ð<OÑOñô ð õ ”	ØØ#Ø”×!Ò! %¨Ñ4Ô4Øð	ñ ô ˆAð ŒG�LŠL�Ð9Ñ:Ô:¸Q¼WÑDÑEÔEÐEÐEÐEÐEÐEÐEøøøøð	Føøøõ  œ A™œˆŒØˆs   ÁA- Á-DÁ<BDÄDc           	      ó^  — t          |t          ¦  «        s|g}t          |t          ¦  «        s|g}t          t          j        ¦   «         | j        | j        ||||¦  «        }| j        }| j        �(t           
                    |¦  «        | j        v r| j        }|                      ||¦  «         dS )aÊ  Record a new journal entry

        * namespace: an opaque string; this can be used to filter on the type
          of recorded entries.
        * name: the name defining this entry; for bookmarks, this is the
          bookmark name. Can be filtered on when retrieving entries.
        * oldhashes and newhashes: each a single binary hash, or a list of
          binary hashes. These represent the old and new position of the named
          item.

        N)Ú
isinstancerC   r‘   r   Úmakedater¢   r£   rZ   r¼   r}   rO   r€   rŠ   )r°   r~   r¤   rJ   rK   r�   rZ   s          r"   rF   zjournalstorage.recordq  s·   € õ ˜)¥TÑ*Ô*ð 	$Ø"˜ˆIÝ˜)¥TÑ*Ô*ð 	$Ø"˜ˆIåÝÔÑÔØŒIØŒLØØØØñ
ô 
ˆð ŒhˆØŒ>Ð%õ  ×#Ò# IÑ.Ô.°$Ô2EÐEÐEØ”n�à�Š�C˜ÑÔÐÐÐr$   c                 ó¼  — |                       |¦  «        5   |dd¬¦  «        5 }|                     dt          j        ¦  «         |                     d¦  «                             d¦  «        d         }|rQ|dt          z  k    rC| j                             t          d¦  «        |z  ¦  «         	 d d d ¦  «         d d d ¦  «         d S |s | 
                    dt          z  dz   ¦  «         |                     dt          j        ¦  «         | 
                    t          |¦  «        dz   ¦  «         d d d ¦  «         n# 1 swxY w Y   d d d ¦  «         d S # 1 swxY w Y   d S )	Nr&   s   a+b)Úmoder   é   ó    ó   %ds&   unsupported journal file version '%s'
)r×   ÚseekÚosÚSEEK_SETr[   rÂ   Ústorageversionr!   rÐ   r   ru   ÚSEEK_ENDÚbytes)r°   rZ   r�   ÚfÚversions        r"   rŠ   zjournalstorage._write•  sý  € Ø�ZŠZ˜‰_Œ_ð 	.ð 	.à��^¨&Ð1Ñ1Ô1ð .°QØ—’�q�"œ+Ñ&Ô&Ð&ð Ÿ&š& ™)œ)×-Ò-¨eÑ4Ô4°QÔ7�Øð ˜w¨%µ.Ñ*@Ò@Ð@ð
 ”G—L’LÝÐDÑEÔEÈÑOñô ð ð ð.ð .ð .ñ .ô .ð .ð	.ð 	.ð 	.ñ 	.ô 	.ð 	.ð 	.ð 	.ð  ð >à—G’G˜U¥^Ñ3°uÑ<Ñ=Ô=Ð=Ø—’�q�"œ+Ñ&Ô&Ð&Ø—’�˜e™œ uÑ,Ñ-Ô-Ð-ð%.ð .ð .ñ .ô .ð .ð .ð .ð .ð .ð .øøøð .ð .ð .ð .ð	.ð 	.ð 	.ñ 	.ô 	.ð 	.ð 	.ð 	.ð 	.ð 	.ð 	.ð 	.øøøð 	.ð 	.ð 	.ð 	.ð 	.ð 	.sB   –E¤B
D9Â.EÃA'D9Ä-EÄ9D=	Ä=EÅ D=	ÅEÅEÅEc              #   óØ   K  — |�t          j        |¦  «        d         }|�t          j        |¦  «        d         }| D ],}|� ||j        ¦  «        sŒ|� ||j        ¦  «        sŒ(|V — Œ-dS )aU  Yield all journal entries with the given namespace or name

        Both the namespace and the name are optional; if neither is given all
        entries in the journal are produced.

        Matching supports regular expressions by using the `re:` prefix
        (use `literal:` to match names or namespaces that start with `re:`)

        Néÿÿÿÿ)r   Ústringmatcherr~   r¤   )r°   r~   r¤   r�   s       r"   Úfilteredzjournalstorage.filtered¬  s–   è è € ð Ð Ý"Ô0°Ñ;Ô;¸BÔ?ˆIØÐÝÔ+¨DÑ1Ô1°"Ô5ˆDØð 	ð 	ˆEØÐ$¨Y¨Y°u´Ñ-GÔ-GÐ$ØØÐ¨¨¨U¬ZÑ(8Ô(8ÐØØˆKˆKˆKˆKð	ð 	r$   c                 ó¶   ‡ — ‰                       ‰ j        ¦  «        }‰ j        €|S ˆ fd„‰                       ‰ j        ¦  «        D ¦   «         }t          ||¦  «        S )zlIterate over the storage

        Yields journalentry instances for each contained journal record.

        Nc              3   óh   •K  — | ],}t                                |j        ¦  «        ‰j        v ¯(|V — Œ-d S r|   )r}   rO   r~   r€   )rd   r   r°   s     €r"   r�   z*journalstorage.__iter__.<locals>.<genexpr>Î  sM   øè è € ð 
ð 
àÝ×#Ò# A¤KÑ0Ô0°DÔ4GÐGÐGð àGÐGÐGÐGð
ð 
r$   )rˆ   rZ   r¼   rq   )r°   r'   rƒ   s   `  r"   Ú__iter__zjournalstorage.__iter__Á  sm   ø€ ð —
’
˜4œ8Ñ$Ô$ˆàŒ>Ð!ØˆLð
ð 
ð 
ð 
à—Z’Z ¤Ñ/Ô/ð
ñ 
ô 
ˆõ
 ! ¨Ñ/Ô/Ð/r$   r&   Tc              #   óè  K  — |                      |¦  «        sd S  ||¦  «        5 }|                     ¦   «         }d d d ¦  «         n# 1 swxY w Y   |                     d¦  «        }|o|d         }|dt          z  k    r5|pt	          d¦  «        }t          j        t	          d¦  «        |z  ¦  «        ‚|dd …         }|rt          |¦  «        }|D ]!}|sŒt           	                    |¦  «        V — Œ"d S )NrÞ   r   rß   s   not availables!   unknown journal file version '%s'rA   )
r…   r[   r›   rã   r   r
   rÍ   Úreversedr‘   r§   )	r°   rZ   ry   rz   ræ   ÚrawÚlinesrç   r    s	            r"   rˆ   zjournalstorage._openÕ  sQ  è è € Ø�zŠz˜(Ñ#Ô#ð 	ØˆFàˆS�‰]Œ]ð 	˜aØ—&’&‘(”(ˆCð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð —	’	˜%Ñ Ô ˆØÐ$˜E !œHˆØ�e�nÑ,Ò,Ð,ØÐ4¥Ð#3Ñ!4Ô!4ˆGÝ”+�aÐ DÑEÔEÈÑOÑPÔPÐPð
 �a�b�b”	ˆØð 	$Ý˜U‘O”OˆEØð 	1ð 	1ˆDØð ØÝ×*Ò*¨4Ñ0Ô0Ð0Ð0Ð0Ð0ð	1ð 	1s   ¥AÁA
ÁA
)NN)r&   T)r²   r³   r´   rµ   rÁ   rÌ   r¾   Úpropertyr£   r¶   r3   rÉ   r×   rF   rŠ   rë   rî   rˆ   rb   r$   r"   r(   r(     sã   € € € € € ðð ð" €OØ€Hð/ð /ð /ð ðð ñ „Xðð ð'ð 'ñ „[ð'ð
ð 
ð 
ðð ð ð," ð " ð " ðH.ð .ð .ð.ð ð ð ð*0ð 0ð 0ð(1ð 1ð 1ð 1ð 1ð 1r$   r(   )s	   no-mergess   graphr;   )r$   ó   allNs   show history for all names)ó   có   commitsNs   show commit metadatac                 ó0   — g | ]}|d          t           v¯|‘ŒS )rA   )Ú_ignoreopts)rd   Úopts     r"   rf   rf   ù  s&   € ÐCÐCÐCˆs¨¨Q¬µ{Ð)BÐ)B€sÐ)BÐ)BÐ)Br$   s   [OPTION]... [BOOKMARKNAME])Úhelpcategoryc           
      óì  ‡— t          j        |¦  «        }d}|                     d¦  «        r%|r!t          j        t          d¦  «        ¦  «        ‚d}|r|d         }|                      d|¦  «        Šˆfd„}|                     d¦  «        d	k    r<|€t          d
¦  «        }nd|z  }|                      t          d¦  «        |z  ¦  «         t          j	        |¦  «        }d}|  
                    d¦  «         t          |j                             |¬¦  «        ¦  «        D �]\  }	}|	|k    r �n‰                     ¦   «          ‰                     | j        dd ||j        ¦  «        ¦  «         ‰                     dd ||j        ¦  «        ¦  «         ‰                     | j        dd|j        ¦  «         ‰                     |                     d¦  «        p|                     d¦  «        dd|j        ¦  «         ‰                     | j        dd‰                     |j        d¦  «        ¦  «         ‰                     dd|j        ¦  «         |                     d¦  «        rØ‰                     ¦   «         rt          j        | ||¦  «        }
n+t          j        | |‰                     d¦  «        |¬¦  «        }
|j        D ]f}	 ||         }|
                     |¦  «         Œ!# t          j        $ r4}‰                      dt          j!        |¦  «        z  ¦  «         Y d}~Œ_d}~ww xY w|
 "                    ¦   «          �Œ‰ #                    ¦   «          |€$|                      t          d ¦  «        ¦  «         dS dS )!az  show the previous position of bookmarks and the working copy

    The journal is used to see the previous commits that bookmarks and the
    working copy pointed to. By default the previous locations for the working
    copy.  Passing a bookmark name will show all the previous positions of
    that bookmark. Use the --all switch to show previous locations for all
    bookmarks and the working copy; each line will then include the bookmark
    name, or '.' for the working copy, as well.

    If `name` starts with `re:`, the remainder of the name is treated as
    a regular expression. To match a name that actually starts with `re:`,
    use the prefix `literal:`.

    By default hg journal only shows the commit hash and the command that was
    running at that time. -v/--verbose will show the prior hash, the user, and
    the time at which it happened.

    Use -c/--commits to output log information on each commit hash; at this
    point you can use the usual `--patch`, `--git`, `--stat` and `--template`
    switches to alter the log output for these.

    `hg journal -T json` can be used to produce machine readable output.

    rB   rô   s/   You can't combine --all and filtering on a nameNr   r;   c                 óZ   •— ‰                      t          ‰j        | ¦  «        dd¬¦  «        S )Ns   noder™   )r¤   Úsep)Ú
formatlistr®   Úhexfunc)ÚnodesÚfms    €r"   Úformatnodeszjournal.<locals>.formatnodes#  s'   ø€ Ø�}Š}�S ¤¨UÑ3Ô3¸'Àtˆ}ÑLÔLÐLr$   s   templates   jsons   the working copy and bookmarkss   '%s's   previous locations of %s:
)r¤   s   oldnodess   %s -> s   newnodess   %ss   users    %-8ss   re:s   names     %-8ss   dates    %ss   %Y-%m-%d %H:%M %1%2s   commands     %s
rö   s
   changesets)Údiffoptss   %s

s   no recorded locations
)$r   ÚbyteskwargsrO   r
   rÍ   r   Ú	formatterÚstatusr   ÚgetlimitÚpagerri   r)   rë   Ú	startitemÚ	condwriteÚverboserJ   ru   rK   r¢   Ú
startswithr¤   Ú
formatdater¥   r£   ÚisplainÚchangesetdisplayerÚchangesetformatterÚnestedÚshowÚRepoLookupErrorÚplainr¯   ÚcloseÚend)r!   r.   r8   Úoptsr¤   r  ÚdisplaynameÚlimitr�   ÚcountÚ	displayerr—   Úctxr   r  s                 @r"   r)   r)   ó  s   ø€ õF Ô Ñ%Ô%€DØ€DØ‡x‚x�ÑÔð Øð 	Ý”+ÝÐDÑEÔEñô ð ð ˆØð Ø�AŒwˆà	�Š�j $Ñ	'Ô	'€BðMð Mð Mð Mð Mð ‡x‚x�ÑÔ Ò'Ð'Øˆ<ÝÐ=Ñ>Ô>ˆKˆKà! D™.ˆKØ
�	Š	•!Ð2Ñ3Ô3°kÑAÑBÔBÐBåÔ Ñ%Ô%€EØ€EØ‡H‚HˆZÑÔÐÝ! $¤,×"7Ò"7¸TÐ"7Ñ"BÔ"BÑCÔCð &ñ &‰ˆˆuØ�EŠ>ˆ>Ø‰Eà
�Š‰ŒˆØ
�ŠØŒJ˜ Y°°¸E¼OÑ0LÔ0Lñ	
ô 	
ð 	
ð 	�Š�˜e [ [°´Ñ%AÔ%AÑBÔBÐBØ
�Š�R”Z ¨(°E´JÑ?Ô?Ð?Ø
�ŠØ�HŠH�VÑÔÐ7 §¢°Ñ 7Ô 7ØØØŒJñ		
ô 	
ð 	
ð 	�ŠØŒJØØØ�MŠM˜%œ/Ð+AÑBÔBñ		
ô 	
ð 	
ð 	�Š�˜Y¨¬Ñ6Ô6Ð6à�8Š8�JÑÔð 	Ø�zŠz‰|Œ|ð Ý&Ô9¸"¸dÀDÑIÔI�	�	å&Ô9Ø˜˜bŸiši¨Ñ6Ô6Àðñ ô �	ð œð >ð >�ð>Ø˜tœ*�CØ—N’N 3Ñ'Ô'Ð'Ð'øÝÔ,ð >ð >ð >Ø—H’H˜Y­Ô)9¸!Ñ)<Ô)<Ñ<Ñ=Ô=Ð=Ð=Ð=Ð=Ð=Ð=øøøøð>øøøà�OŠOÑÔÐùà‡F‚F�H„H€Hà€}Ø
�	Š	•!Ð.Ñ/Ô/Ñ0Ô0Ð0Ð0Ð0ð €}s   Ë KËL!Ë-*LÌL!)5rµ   Úcollectionsrá   rÔ   Úmercurial.i18nr   Úmercurial.noder   r   Ú	mercurialr   r   r   r	   r
   r   r   r   r   r   r   r   r   Úmercurial.utilsr   r   r   Úcmdtabler£   Ú
testedwithrã   rP   rG   Úsharedbookmarksr}   r#   r1   r   r-   r   r=   r   r^   rq   r   r    Ú
namedtupler‘   r(   rø   ÚlogoptsÚCATEGORY_CHANGE_ORGANIZATIONr)   rb   r$   r"   ú<module>r(     s  ððð ð Ð Ð Ð Ø 	€	€	€	Ø €€€à Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ð
ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð ð ð €Ø
ˆ)Ô
˜HÑ
%Ô
%€ð #€
ð €ð €Ø€ð �"Ô$ðÐ ð
>ð >ð >ð
+ð 
+ð 
+ð1ð 1ð 1ðHð Hð Hðð ð ð

ð 

ð 

ð	ð 	ð 	ðð ð ð"ð "ð "ð:#ð #ð #ð$ð $ð $ð>A,ð A,ð A,ð A,ð A,Ø€KÔØØCñô ñA,ô A,ð A,ðHQ1ð Q1ð Q1ð Q1ð Q1ñ Q1ô Q1ð Q1ðl '€ð 	€Øà:Ø9ðð DÐC�g”oÐCÑCÔCñ	Dð
 "ØÔ5ð	ñ 	ô 	ð^1ð ^1ñ	ô 	ð^1ð ^1ð ^1r$   