ó
    ‘óýj_   ã                   óÜ  • S r / SQrSSKrSSKrSSKrSSKJrJr  SSKJ	r	  SSK
Jr  SSKJrJr  SSKJr  SS	KJr  SS
KJrJr  SSKJr  SSKJrJrJrJr  SSKJrJr   " S S\ 5      r! " S S\!5      r" " S S\!5      r# " S S\5      r$\	 " S S5      5       r% " S S5      r& " S S\5      r' " S S5      r( " S S\5      r) " S  S!5      r* " S" S#5      r+  S3S$\S%\,S&\,S-  S'\,S-  S(\-\,   4
S) jjr.   S4S$\S%\,S&\,S-  S'\,S-  S*\\,/\,4   S-  S(\&4S+ jjr/S$\S*\\,/\,4   S(\&4S, jr0  S3S$\S-\&S-  S*\\,/\,4   S-  S(\1\2\3S-  4   4S. jjr4 S5S$\S/\+S0\%S1\2S*\\,/\,4   S-  S(\3S-  4S2 jjr5g)6zGit rebase implementation.)ÚDiskRebaseStateManagerÚMemoryRebaseStateManagerÚRebaseAbortÚRebaseConflictÚRebaseErrorÚRebaseStateÚRebaseStateManagerÚ
RebaseTodoÚRebaseTodoCommandÚRebaseTodoEntryÚRebaserÚ	edit_todoÚprocess_interactive_rebaseÚrebaseÚstart_interactiveé    N)ÚCallableÚSequence)Ú	dataclass)ÚEnum)ÚProtocolÚ	TypedDict)Úfind_merge_base)Úthree_way_merge)ÚCommitÚObjectID)Úparse_commit)ÚHEADREFÚRefÚlocal_branch_nameÚset_ref_from_raw)ÚBaseRepoÚRepoc                   ó   • \ rS rSrSrSrg)r   é:   zBase class for rebase errors.© N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r%   ó    Ú9/usr/local/lib/python3.13/site-packages/dulwich/rebase.pyr   r   :   s   † Ü'r-   r   c                   ó:   ^ • \ rS rSrSrS\\   4U 4S jjrSrU =r	$ )r   é>   z%Raised when a rebase conflict occurs.Úconflicted_filesc                 ób   >• Xl         [        TU ]	  SSR                  S U 5       5       35        g)zTInitialize RebaseConflict.

Args:
  conflicted_files: List of conflicted file paths
zConflicts in: z, c              3   óD   #   • U  H  oR                  S S5      v •  M     g7f)úutf-8ÚreplaceN)Údecode)Ú.0Úfs     r.   Ú	<genexpr>Ú*RebaseConflict.__init__.<locals>.<genexpr>I   s   é € Ð&^ÒM]È§x¡x°¸×'CÐ'CÒM]ùs   ‚ N)r1   ÚsuperÚ__init__Újoin)Úselfr1   Ú	__class__s     €r.   r<   ÚRebaseConflict.__init__A   s3   ø€ ð !1ÔÜ‰ÑØ˜TŸY™YÑ&^ÑM]Ó&^Ó^Ð_Ð`õ	
r-   )r1   )
r'   r(   r)   r*   r+   ÚlistÚbytesr<   r,   Ú__classcell__)r?   s   @r.   r   r   >   s   ø† Ù/ð	
¨¨e©÷ 	
õ 	
r-   r   c                   ó   • \ rS rSrSrSrg)r   éM   zRaised when rebase is aborted.r%   Nr&   r%   r-   r.   r   r   M   s   † Ü(r-   r   c                   ó`   • \ rS rSrSrSrSrSrSrSr	Sr
S	rS
rSrSrSr\S\SS 4S j5       rSrg)r
   éQ   zEnum for rebase todo commands.ÚpickÚrewordÚeditÚsquashÚfixupÚexecÚbreakÚdropÚlabelÚresetÚmergeÚsÚreturnc                 óv  • UR                  5       nU R                  U R                  U R                  U R                  U R
                  U R                  U R                  U R                  U R                  U R                  U R                  S.nX;   a  X!   $  U " U5      $ ! [         a    [        SU 35      ef = f)zÃParse a command from its string representation.

Args:
    s: Command string (can be abbreviated)

Returns:
    RebaseTodoCommand enum value

Raises:
    ValueError: If command is not recognized
)ÚpÚrÚerS   r8   ÚxÚbÚdÚlÚtÚmzUnknown rebase command: )ÚlowerÚPICKÚREWORDÚEDITÚSQUASHÚFIXUPÚEXECÚBREAKÚDROPÚLABELÚRESETÚMERGEÚ
ValueError)ÚclsrS   Úabbreviationss      r.   Úfrom_stringÚRebaseTodoCommand.from_string`   s¦   € ð �G‰G‹Iˆð —‘Ø—‘Ø—‘Ø—‘Ø—‘Ø—‘Ø—‘Ø—‘Ø—‘Ø—‘Ø—‘ñ
ˆð ÓØ Ñ#Ð#ð	=Ù�q“6ˆMøÜó 	=ÜÐ7¸°sÐ;Ó<Ð<ð	=ús   ÂB ÂB8r%   N)r'   r(   r)   r*   r+   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   ÚclassmethodÚstrrn   r,   r%   r-   r.   r
   r
   Q   s]   † Ù(à€DØ€FØ€DØ€FØ€EØ€DØ€EØ€DØ€EØ€EØ€Eàð#=˜Cð #=Ð$7ó #=ó ó#=r-   r
   c                   ó’   • \ rS rSr% Sr\\S'   Sr\S-  \S'   Sr	\
S-  \S'   Sr\
S-  \S'   SS\S	\
4S
 jjr\S\
S	S4S j5       rSrg)r   é‡   z0Represents a single entry in a rebase todo list.ÚcommandNÚ
commit_shaÚshort_messageÚ	argumentsÚ
abbreviaterT   c                 óV  • U(       aã  [         R                  S[         R                  S[         R                  S[         R                  S[         R
                  S[         R                  S[         R                  S[         R                  S[         R                  S	[         R                  S
[         R                  S0nUR                  U R                  U R                  R                  5      nOU R                  R                  nU/nU R                  (       a,  UR!                  U R                  R#                  5       SS 5        U R$                  (       a  UR!                  U R$                  5        O,U R&                  (       a  UR!                  U R&                  5        SR)                  U5      $ )z‘Convert to git-rebase-todo format string.

Args:
    abbreviate: Use abbreviated command names

Returns:
    String representation for todo file
rV   rW   rX   rS   r8   rY   rZ   r[   r\   r]   r^   Né   Ú )r
   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   Úgetrt   Úvalueru   Úappendr6   rw   rv   r=   )r>   rx   Úcmd_mapÚcmdÚpartss        r.   Ú	to_stringÚRebaseTodoEntry.to_string�   s$  € ö ä!×&Ñ&¨Ü!×(Ñ(¨#Ü!×&Ñ&¨Ü!×(Ñ(¨#Ü!×'Ñ'¨Ü!×&Ñ&¨Ü!×'Ñ'¨Ü!×&Ñ&¨Ü!×'Ñ'¨Ü!×'Ñ'¨Ü!×'Ñ'¨ðˆGð —+‘+˜dŸl™l¨D¯L©L×,>Ñ,>Ó?‰Cà—,‘,×$Ñ$ˆCà�ˆà�?�?à�L‰L˜Ÿ™×/Ñ/Ó1°"°1Ð5Ô6à�>�>Ø�L‰L˜Ÿ™Õ(Ø××Ø�L‰L˜×+Ñ+Ô,à�x‰x˜‹Ðr-   ÚlinezRebaseTodoEntry | Nonec                 ó\  • UR                  5       nU(       a  UR                  S5      (       a  gUR                  SS5      nU(       d  gUS   n [        R	                  U5      nSnSnSnU[        R                  [        R                  [        R                  4;   a$  [        U5      S:”  a  SR                  USS 5      nOTU[        R                  :X  a  O?[        U5      S:”  a0  [        US   R                  5       5      n[        U5      S:”  a  US   nU " UUUUS9$ ! [
         a     gf = f)z�Parse a todo entry from a line.

Args:
    line: Line from git-rebase-todo file

Returns:
    RebaseTodoEntry or None if line is empty/comment
Ú#Né   r   é   r{   )rt   ru   rv   rw   )ÚstripÚ
startswithÚsplitr
   rn   rk   re   rh   ri   Úlenr=   rf   r   Úencode)rl   r„   r�   Úcommand_strrt   ru   rv   rw   s           r.   rn   ÚRebaseTodoEntry.from_string¸   s+  € ð �z‰z‹|ˆö �t—‘ s×+Ñ+Øà—
‘
˜4 Ó#ˆÞØà˜A‘hˆð	Ü'×3Ñ3°KÓ@ˆGð
 ˆ
ØˆØˆ	àÜ×"Ñ"Ü×#Ñ#Ü×#Ñ#ð
ó 
ô �5‹z˜A‹~ØŸH™H U¨1¨2 YÓ/�	øØÔ)×/Ñ/Ó/àô �5‹z˜A‹~ä% e¨A¡h§o¡oÓ&7Ó8�
ô �u“: “>Ø$)¨!¡H�MáØØ!Ø'Øñ	
ð 	
øô; ó 	áð	ús   ÁD Ä
D+Ä*D+r%   )F)r'   r(   r)   r*   r+   r
   Ú__annotations__ru   r   rv   rq   rw   Úboolr‚   rp   rn   r,   r%   r-   r.   r   r   ‡   sl   ‡ á:àÓØ"&€J�˜4‘Ó&Ø $€M�3˜‘:Ó$Ø €Iˆs�T‰zÓ ñ& Dð &°Sõ &ðP ð8
˜sð 8
Ð'?ó 8
ó ó8
r-   r   c                   óÈ   • \ rS rSrSrSS\\   S-  4S jjrS\SS4S jrS\S-  4S	 jr	SS
 jr
S\4S jrSS\S\4S jjr\S\SS 4S j5       r\S\\   SS 4S j5       rSrg)r	   éô   z8Manages the git-rebase-todo file for interactive rebase.NÚentriesc                 ó2   • U=(       d    / U l         SU l        g)z@Initialize RebaseTodo.

Args:
    entries: List of todo entries
r   N)r”   Úcurrent_index)r>   r”   s     r.   r<   ÚRebaseTodo.__init__÷   s   € ð —} "ˆŒØˆÕr-   ÚentryrT   c                 ó:   • U R                   R                  U5        g)zAdd an entry to the todo list.N)r”   r~   )r>   r˜   s     r.   Ú	add_entryÚRebaseTodo.add_entry   s   € à�‰×Ñ˜EÕ"r-   c                 ó|   • U R                   [        U R                  5      :  a  U R                  U R                      $ g)zGet the current todo entry.N©r–   rŒ   r”   ©r>   s    r.   Úget_currentÚRebaseTodo.get_current  s1   € à×Ñ¤ D§L¡LÓ 1Ó1Ø—<‘< × 2Ñ 2Ñ3Ð3Ør-   c                 ó.   • U =R                   S-  sl         g)zMove to the next todo entry.rˆ   N)r–   rž   s    r.   ÚadvanceÚRebaseTodo.advance
  s   € à×Ò˜aÑÖr-   c                 óF   • U R                   [        U R                  5      :¬  $ )z)Check if all entries have been processed.r�   rž   s    r.   Úis_completeÚRebaseTodo.is_complete  s   € à×!Ñ!¤S¨¯©Ó%6Ñ6Ð6r-   Úinclude_commentsc                 ón  • / nU R                   U R                  S  H"  nUR                  UR                  5       5        M$     U(       GaÜ  UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S	5        UR                  S
5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        SR	                  U5      $ )z‰Convert to git-rebase-todo file format.

Args:
    include_comments: Include helpful comments

Returns:
    String content for todo file
NÚ z# Rebase in progressr†   z# Commands:z# p, pick <commit> = use commitz># r, reword <commit> = use commit, but edit the commit messagez6# e, edit <commit> = use commit, but stop for amendingz@# s, squash <commit> = use commit, but meld into previous commitzH# f, fixup [-C | -c] <commit> = like 'squash' but keep only the previouszK#                    commit's log message, unless -C is used, in which casezJ#                    keep only this commit's message; -c is same as -C butz%#                    opens the editorzD# x, exec <command> = run command (the rest of the line) using shellzK# b, break = stop here (continue rebase later with 'git rebase --continue')z"# d, drop <commit> = remove commitz3# l, label <label> = label current HEAD with a namez*# t, reset <label> = reset HEAD to a labelz<# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]zA# .       create a merge commit using the original merge commit'szB# .       message (or the oneline, if no original merge commit waszB# .       specified); use -c <commit> to reword the commit messagezF# These lines can be re-ordered; they are executed from top to bottom.z5# If you remove a line here THAT COMMIT WILL BE LOST.z@# However, if you remove everything, the rebase will be aborted.Ú
)r”   r–   r~   r‚   r=   )r>   r§   Úlinesr˜   s       r.   r‚   ÚRebaseTodo.to_string  sã  € ð ˆð —\‘\ $×"4Ñ"4Ð"6Ó7ˆEØ�L‰L˜Ÿ™Ó*Ö+ñ 8÷ Ø�L‰L˜ÔØ�L‰LÐ/Ô0Ø�L‰L˜ÔØ�L‰L˜Ô'Ø�L‰LÐ:Ô;Ø�L‰LØPôð �L‰LÐQÔRØ�L‰LØRôð �L‰LØZôð �L‰LØ]ôð �L‰LØ\ôð �L‰LÐ@ÔAØ�L‰LØVôð �L‰LØ]ôð �L‰LÐ=Ô>Ø�L‰LÐNÔOØ�L‰LÐEÔFØ�L‰LÐWÔXØ�L‰LØSôð �L‰LØTôð �L‰LØTôð �L‰L˜ÔØ�L‰LØXôð �L‰L˜ÔØ�L‰LÐPÔQØ�L‰L˜ÔØ�L‰LØRôð �L‰L˜Ôà�y‰y˜ÓÐr-   Úcontentc                 ó¤   • / nUR                  S5       H2  n[        R                  U5      nU(       d  M!  UR                  U5        M4     U " U5      $ )ziParse a git-rebase-todo file.

Args:
    content: Content of todo file

Returns:
    RebaseTodo instance
rª   )r‹   r   rn   r~   )rl   r­   r”   r„   r˜   s        r.   rn   ÚRebaseTodo.from_stringY  sK   € ð ˆð —M‘M $Ö'ˆDÜ#×/Ñ/°Ó5ˆEßˆuØ—‘˜uÖ%ñ (ñ
 �7‹|Ðr-   Úcommitsc                 óò   • / nU Hh  nUR                   R                  SSS9nUR                  S5      S   SS n[        [        R
                  UR                  US9nUR                  U5        Mj     U " U5      $ )	z·Create a todo list from a list of commits.

Args:
    commits: List of commits to rebase (in chronological order)

Returns:
    RebaseTodo instance with pick commands for each commit
r4   r5   ©Úerrorsrª   r   Né2   )rt   ru   rv   )Úmessager6   r‹   r   r
   r`   Úidr~   )rl   r°   r”   Úcommitrµ   rv   r˜   s          r.   Úfrom_commitsÚRebaseTodo.from_commitsn  s}   € ð ˆÛˆFà—n‘n×+Ñ+¨G¸IÐ+ÐFˆGØ#ŸM™M¨$Ó/°Ñ2°3°BÐ7ˆMä#Ü)×.Ñ.Ø!Ÿ9™9Ø+ñˆEð
 �N‰N˜5Ö!ñ ñ �7‹|Ðr-   )r–   r”   ©N©rT   N)T)r'   r(   r)   r*   r+   rA   r   r<   rš   rŸ   r¢   r‘   r¥   rq   r‚   rp   rn   r   r   r¸   r,   r%   r-   r.   r	   r	   ô   s°   † ÙBñ  _Ñ 5¸Ñ <õ ð#˜ð #°4ô #ð˜_¨tÑ3ô ô ð7˜Tô 7ñE ¨$ð E ¸#õ E ðN ð #ð ¨,ó ó ðð( ð 8¨FÑ#3ð ¸ó ó ór-   r	   c                   óÒ   • \ rS rSrSrS\S-  S\S-  S\S-  S\\	   S\\	   S	S4S
 jr
S	\\S-  \S-  \S-  \\	   \\	   4   4S jrSS jrS	\4S jrS\S	S4S jrS	\S-  4S jrSrg)r   iˆ  z#Protocol for managing rebase state.Úoriginal_headNÚrebasing_branchÚontoÚtodoÚdonerT   c                 ó   • g)zSave rebase state.Nr%   ©r>   r½   r¾   r¿   rÀ   rÁ   s         r.   ÚsaveÚRebaseStateManager.save‹  s   € ð 	r-   c                 ó   • g)zLoad rebase state.Nr%   rž   s    r.   ÚloadÚRebaseStateManager.load–  s   € ð 	r-   c                 ó   • g©zClean up rebase state.Nr%   rž   s    r.   ÚcleanÚRebaseStateManager.clean¢  ó   € àr-   c                 ó   • g©úCheck if rebase state exists.Nr%   rž   s    r.   ÚexistsÚRebaseStateManager.exists¦  rÍ   r-   c                 ó   • g)z"Save interactive rebase todo list.Nr%   ©r>   rÀ   s     r.   Ú	save_todoÚRebaseStateManager.save_todoª  rÍ   r-   c                 ó   • g)z"Load interactive rebase todo list.Nr%   rž   s    r.   Ú	load_todoÚRebaseStateManager.load_todo®  rÍ   r-   r%   r»   )r'   r(   r)   r*   r+   rB   r   r   rA   r   rÄ   ÚtuplerÇ   rË   r‘   rÑ   r	   rÕ   rØ   r,   r%   r-   r.   r   r   ˆ  sÇ   † Ù-ð	à˜t‘|ð	ð ˜t™ð	ð ˜‰oð		ð
 �6‰lð	ð �6‰lð	ð 
ô	ð
à	Ø�‰Øˆd‰
Ø�4‰ØˆV‰ØˆV‰ð		ñ
ô
ôð˜ô ð˜jð ¨Tô ð˜:¨Ñ,÷ r-   r   c                   ó  • \ rS rSrSrS\SS4S jrS\S-  S\S-  S	\	S-  S
\
\   S\
\   SS4S jrS\S\SS4S jrS\\S-  \S-  \	S-  \
\   \
\   4   4S jrS\S\S-  4S jrSS jrS\4S jrS
\SS4S jrS\S-  4S jrSrg)r   i³  z7Manages rebase state on disk using same files as C Git.ÚpathrT   Nc                 ó   • Xl         g)zZInitialize disk rebase state manager.

Args:
    path: Path to the rebase-merge directory
N©rÜ   )r>   rÜ   s     r.   r<   ÚDiskRebaseStateManager.__init__¶  s	   € ð �	r-   r½   r¾   r¿   rÀ   rÁ   c                 ó  • [         R                  " U R                  SS9  U(       a  U R                  SU5        U(       a  U R                  SU5        U(       a  U R                  SU5        U(       a™  US   nU R                  SUR                  5        [        U5      S-   n[        U5      [        U5      -   nU R                  S	[        U5      R                  5       5        U R                  S
[        U5      R                  5       5        gg)zSave rebase state to disk.T)Úexist_okú	orig-headú	head-namer¿   r   zstopped-sharˆ   ÚmsgnumÚendN)ÚosÚmakedirsrÜ   Ú_write_filer¶   rŒ   rq   r�   )	r>   r½   r¾   r¿   rÀ   rÁ   Úcurrent_commiträ   rå   s	            r.   rÄ   ÚDiskRebaseStateManager.save¾  s×   € ô 	�Š�D—I‘I¨Ò-ö Ø×Ñ˜[¨-Ô8ö Ø×Ñ˜[¨/Ô:ö Ø×Ñ˜V TÔ*ö à! !™WˆNØ×Ñ˜]¨N×,=Ñ,=Ô>ô ˜“Y ‘]ˆFÜ�d“)œc $›iÑ'ˆCØ×Ñ˜X¤s¨6£{×'9Ñ'9Ó';Ô<Ø×Ñ˜U¤C¨£H§O¡OÓ$5Õ6ð r-   Únamer­   c                 óÂ   • [        [        R                  R                  U R                  U5      S5       nUR	                  U5        SSS5        g! , (       d  f       g= f)z0Write content to a file in the rebase directory.ÚwbN)Úopenræ   rÜ   r=   Úwrite)r>   rë   r­   r8   s       r.   rè   Ú"DiskRebaseStateManager._write_fileâ  s9   € ä”"—'‘'—,‘,˜tŸy™y¨$Ó/°Ô6¸!Ø�G‰G�GÔ÷ 7×6Ö6ús   µAÁ
Ac                 óÆ   • SnSnSn/ n/ nU R                  S5      nU R                  S5      nUb  [        U5      OSnU R                  S5      nUb  [        U5      OSnXXtU4$ )zLoad rebase state from disk.Nrâ   rã   r¿   )Ú
_read_filer   r   )r>   r½   Úrebasing_branch_bytesÚ
onto_bytesrÀ   rÁ   r¾   r¿   s           r.   rÇ   ÚDiskRebaseStateManager.loadç  s�   € ð ˆØ $ÐØˆ
ØˆØˆð Ÿ™¨Ó4ˆØ $§¡°Ó <Ðà*?Ñ*KŒCÐ%Ô&ÐQUð 	ð —_‘_ VÓ,ˆ
Ø'1Ñ'=Œx˜
Ô#À4ˆà¨t¸4Ð?Ð?r-   c                 óþ   •  [        [        R                  R                  U R                  U5      S5       nUR	                  5       R                  5       sSSS5        $ ! , (       d  f       g= f! [         a     gf = f)z1Read content from a file in the rebase directory.ÚrbN)rî   ræ   rÜ   r=   Úreadr‰   ÚFileNotFoundError)r>   rë   r8   s      r.   rò   Ú!DiskRebaseStateManager._read_file  sS   € ð	Ü”b—g‘g—l‘l 4§9¡9¨dÓ3°TÔ:¸aØ—v‘v“x—~‘~Ó'÷ ;×:×:ûä ó 	Ùð	ús.   ‚4A/ ¶AÁ	A/ Á
A,Á(A/ Á,A/ Á/
A<Á;A<c                 óf   •  [         R                  " U R                  5        g! [         a     gf = f©zClean up rebase state files.N)ÚshutilÚrmtreerÜ   rù   rž   s    r.   rË   ÚDiskRebaseStateManager.clean
  s)   € ð	Ü�MŠM˜$Ÿ)™)Õ$øÜ ó 	áð	ús   ‚ # £
0¯0c                 ó�   • [         R                  R                  [         R                  R                  U R                  S5      5      $ )rÐ   râ   )ræ   rÜ   rÑ   r=   rž   s    r.   rÑ   ÚDiskRebaseStateManager.exists  s(   € ä�w‰w�~‰~œbŸg™gŸl™l¨4¯9©9°kÓBÓCÐCr-   c                 óf   • UR                  5       nU R                  SUR                  S5      5        g)úVSave the interactive rebase todo list.

Args:
    todo: The RebaseTodo object to save
úgit-rebase-todor4   N)r‚   rè   r�   )r>   rÀ   Útodo_contents      r.   rÕ   Ú DiskRebaseStateManager.save_todo  s,   € ð —~‘~Ó'ˆØ×ÑÐ*¨L×,?Ñ,?ÀÓ,HÕIr-   c                 ó~   • U R                  S5      nU(       a%  UR                  SSS9n[        R                  U5      $ g)zfLoad the interactive rebase todo list.

Returns:
    RebaseTodo object or None if no todo file exists
r  r4   r5   r²   N)rò   r6   r	   rn   )r>   r  Útodo_strs      r.   rØ   Ú DiskRebaseStateManager.load_todo  s?   € ð —‘Ð'8Ó9ˆÞØ#×*Ñ*¨7¸9Ð*ÐEˆHÜ×)Ñ)¨(Ó3Ð3Ør-   rÞ   r»   )r'   r(   r)   r*   r+   rq   r<   rB   r   r   rA   r   rÄ   rè   rÚ   rÇ   rò   rË   r‘   rÑ   r	   rÕ   rØ   r,   r%   r-   r.   r   r   ³  s  † ÙAð˜Sð  Tô ð"7à˜t‘|ð"7ð ˜t™ð"7ð ˜‰oð	"7ð
 �6‰lð"7ð �6‰lð"7ð 
ô"7ðH ð ¨eð ¸ô ð
@à	Ø�‰Øˆd‰
Ø�4‰ØˆV‰ØˆV‰ð		ñ
ô@ð6˜sð  u¨t¡|ô ôðD˜ô DðJ˜jð J¨Tô Jð
˜:¨Ñ,÷ 
r-   r   c                   ój   • \ rS rSr% Sr\S-  \S'   \S-  \S'   \S-  \S'   \	\
   \S'   \	\
   \S'   S	rg)
r   i,  z!Type definition for rebase state.Nr½   r¾   r¿   rÀ   rÁ   r%   )r'   r(   r)   r*   r+   rB   r�   r   r   rA   r   r,   r%   r-   r.   r   r   ,  s7   ‡ Ù+à˜4‘<ÓØ˜4‘ZÓØ
�T‰/ÓØ
ˆv‰,ÓØ
ˆv‰,Ör-   r   c                   óä   • \ rS rSrSrS\SS4S jrS\S-  S\S-  S	\	S-  S
\
\   S\
\   SS4S jrS\\S-  \S-  \	S-  \
\   \
\   4   4S jrSS jrS\4S jrS
\SS4S jrS\S-  4S jrSrg)r   i6  z.Manages rebase state in memory for MemoryRepo.ÚreporT   Nc                 ó,   • Xl         SU l        SU l        g)zHInitialize MemoryRebaseStateManager.

Args:
  repo: Repository instance
N)r  Ú_stateÚ_todo©r>   r  s     r.   r<   Ú!MemoryRebaseStateManager.__init__9  s   € ð Œ	Ø*.ˆŒØ(,ˆ�
r-   r½   r¾   r¿   rÀ   rÁ   c           	      ó4   • [        UUUUSS USS S9U l        g)zSave rebase state in memory.N)r½   r¾   r¿   rÀ   rÁ   )r   r  rÃ   s         r.   rÄ   ÚMemoryRebaseStateManager.saveC  s'   € ô "Ø'Ø+ØØ‘a�Ø‘a�ñ
ˆ�r-   c                 óÆ   • U R                   c  SSS/ / 4$ U R                   S   U R                   S   U R                   S   U R                   S   SS U R                   S   SS 4$ )zLoad rebase state from memory.Nr½   r¾   r¿   rÀ   rÁ   ©r  rž   s    r.   rÇ   ÚMemoryRebaseStateManager.loadT  sr   € ð �;‰;ÑØ˜˜t R¨Ð+Ð+ð �K‰K˜Ñ(Ø�K‰KÐ)Ñ*Ø�K‰K˜ÑØ�K‰K˜Ñ¡Ð"Ø�K‰K˜Ñ¡Ð"ð
ð 	
r-   c                 ó    • SU l         SU l        grÊ   )r  r  rž   s    r.   rË   ÚMemoryRebaseStateManager.cleani  s   € àˆŒØˆ�
r-   c                 ó   • U R                   SL$ rÏ   r  rž   s    r.   rÑ   ÚMemoryRebaseStateManager.existsn  s   € à�{‰{ $Ð&Ð&r-   c                 ó   • Xl         g)r  N©r  rÔ   s     r.   rÕ   Ú"MemoryRebaseStateManager.save_todor  s	   € ð �
r-   c                 ó   • U R                   $ )zaLoad the interactive rebase todo list.

Returns:
    RebaseTodo object or None if no todo exists
r  rž   s    r.   rØ   Ú"MemoryRebaseStateManager.load_todoz  s   € ð �z‰zÐr-   )r  r  r  r»   )r'   r(   r)   r*   r+   r!   r<   rB   r   r   rA   r   rÄ   rÚ   rÇ   rË   r‘   rÑ   r	   rÕ   rØ   r,   r%   r-   r.   r   r   6  sÚ   † Ù8ð-˜Xð -¨$ô -ð
à˜t‘|ð
ð ˜t™ð
ð ˜‰oð	
ð
 �6‰lð
ð �6‰lð
ð 
ô
ð"
à	Ø�‰Øˆd‰
Ø�4‰ØˆV‰ØˆV‰ð		ñ
ô
ô*ð
'˜ô 'ð˜jð ¨Tô ð˜:¨Ñ,÷ r-   r   c            
       ó  • \ rS rSrSrS\4S jr SS\S\S-  S\\	   4S	 jjr
S
\	S\S\\S-  \\   4   4S jr  SS\S\S-  S\S-  S\\	   4S jjrS\\\\   4   S-  4S jrS\4S jrSS jrSS jrSS jrSS jrSS jrSrg)r   iƒ  zHandles git rebase operations.r  c                 óÂ   • Xl         UR                  U l        UR                  5       U l        SU l        SU l        / U l        / U l        SU l        U R                  5         g)zEInitialize rebaser.

Args:
    repo: Repository to perform rebase in
N)
r  Úobject_storeÚget_rebase_state_managerÚ_state_managerÚ_original_headÚ_ontor  Ú_doneÚ_rebasing_branchÚ_load_rebase_stater  s     r.   r<   ÚRebaser.__init__†  s]   € ð Œ	Ø ×-Ñ-ˆÔØ"×;Ñ;Ó=ˆÔð -1ˆÔØ&*ˆŒ
Ø#%ˆŒ
Ø#%ˆŒ
Ø,0ˆÔð 	×ÑÕ!r-   NÚupstreamÚbranchrT   c                 óÐ  • UcI  U R                   R                  R                  [        5      u  p4Uc  [	        S5      eU R                   U   nO[        U R                   U5      n[        U R                   U5      nUR                  UR                  :X  a  / $ [        U R                   UR                  UR                  /5      nU(       d  [        S5      eUS   n/ n	Un
U
R                  U:w  ah  [        U
[        5      (       d   eU	R                  U
5        U
R                  (       d  O.U R                   U
R                  S      n
U
R                  U:w  a  Mh  [        [        U	5      5      $ )zÓGet list of commits to rebase.

Args:
    upstream: Upstream commit/branch to rebase onto
    branch: Branch to rebase (defaults to current branch)

Returns:
    List of commits to rebase in chronological order
z%HEAD does not point to a valid commitzNo common ancestor foundr   )r  ÚrefsÚfollowr   rk   r   r¶   r   r   Ú
isinstancer   r~   ÚparentsrA   Úreversed)r>   r+  r,  Ú	_head_refÚhead_shaÚbranch_commitÚupstream_commitÚmerge_basesÚ
merge_baser°   Úcurrents              r.   Ú_get_commits_to_rebaseÚRebaser._get_commits_to_rebaseš  s4  € ð ‰>à"&§)¡)§.¡.×"7Ñ"7¼Ó"@ÑˆIØÑÜ Ð!HÓIÐIØ ŸI™I hÑ/‰Mô )¨¯©°FÓ;ˆMô ' t§y¡y°(Ó;ˆð ×Ñ˜×1Ñ1Ó1ØˆIä% d§i¡i°-×2BÑ2BÀO×DVÑDVÐ1WÓXˆÞÜÐ8Ó9Ð9à  ‘^ˆ
ð ˆØˆØ�j‰j˜JÓ&Ü˜g¤v×.Ñ.Ð.Ð.Ø�N‰N˜7Ô#Ø—?—?ØØ—i‘i §¡°Ñ 2Ñ3ˆGð �j‰j˜JÕ&ô ”H˜WÓ%Ó&Ð&r-   r·   r¿   c                 óz  • UR                   (       d  [        SUR                  < 35      eU R                  UR                   S      nU R                  U   n[	        U[
        5      (       d   e[	        U[
        5      (       d   e[        U R                  X4U5      u  pVU(       a*  U R                  R                  SUR                  5        SU4$ [        5       nUR                  Ul	        U/Ul         UR                  Ul
        UR                  Ul        UR                  Ul        UR                  Ul        UR                  Ul        UR                  Ul        UR                   Ul        UR"                  Ul        U R                  R%                  U5        U R                  R%                  U5        UR                  / 4$ )zÁCherry-pick a commit onto another commit.

Args:
    commit: Commit to cherry-pick
    onto: SHA of commit to cherry-pick onto

Returns:
    Tuple of (new_commit_sha, list_of_conflicted_files)
zCannot cherry-pick root commit r   zrebase-merge/stopped-shaN)r1  r   r¶   r  r0  r   r   r"  Ú_put_named_fileÚtreeÚauthorÚauthor_timeÚauthor_timezoneÚ	committerÚcommit_timeÚcommit_timezonerµ   ÚencodingÚ
add_object)r>   r·   r¿   ÚparentÚonto_commitÚmerged_treeÚ	conflictsÚ
new_commits           r.   Ú_cherry_pickÚRebaser._cherry_pickË  so  € ð �~�~ÜÐ ?ÀÇ	Á	¹}ÐMÓNÐNà—‘˜6Ÿ>™>¨!Ñ,Ñ-ˆØ—i‘i ‘oˆä˜&¤&×)Ñ)Ð)Ð)Ü˜+¤v×.Ñ.Ð.Ð.ô "1Ø×Ñ˜v°Fó"
Ñˆö à�I‰I×%Ñ%Ð&@À&Ç)Á)ÔLØ˜�?Ð"ô “Xˆ
Ø%Ÿ.™.ˆ
ŒØ"˜Vˆ
ÔØ"ŸM™Mˆ
ÔØ!'×!3Ñ!3ˆ
ÔØ%+×%;Ñ%;ˆ
Ô"Ø%×/Ñ/ˆ
ÔØ!'×!3Ñ!3ˆ
ÔØ%+×%;Ñ%;ˆ
Ô"Ø#Ÿ^™^ˆ
ÔØ$Ÿo™oˆ
Ôà×Ñ×$Ñ$ [Ô1Ø×Ñ×$Ñ$ ZÔ0à�}‰}˜bÐ Ð r-   c                 óB  • U R                   R                  R                  [        5      U l        UbA  UR                  S5      (       a  [        U5      U l        Ol[        [        U5      5      U l        ORU R                  b>  U R                  R                  S5      (       a  [        U R                  SS 5      U l        OSU l        Uc  Un[        U R                   U5      nUR                  U l        U R                  X5      nXPl        / U l        U R                  5         U$ )zøStart a rebase.

Args:
    upstream: Upstream branch/commit to rebase onto
    onto: Specific commit to rebase onto (defaults to upstream)
    branch: Branch to rebase (defaults to current branch)

Returns:
    List of commits that will be rebased
Ns   refs/heads/ó   ref: é   )r  r.  Úread_refr   r%  rŠ   r   r(  r   r   r¶   r&  r:  r  r'  Ú_save_rebase_state)r>   r+  r¿   r,  rH  r°   s         r.   ÚstartÚRebaser.startý  sþ   € ð" #Ÿi™iŸn™n×5Ñ5´gÓ>ˆÔð Ñà× Ñ  ×0Ñ0Ü(+¨F«�Õ%ô ),Ô,=¸fÓ,EÓ(F�Õ%ð ×"Ñ"Ñ.°4×3FÑ3F×3QÑ3QØ÷4ñ 4ô ),¨D×,?Ñ,?ÀÀÐ,CÓ(D�Õ%à(,�Ô%ð ‰<ØˆDä" 4§9¡9¨dÓ3ˆØ —^‘^ˆŒ
ð ×-Ñ-¨hÓ?ˆØŒ
ØˆŒ
ð 	×ÑÔ!àˆr-   c                 ó�  • U R                   (       d  U R                  5         gU R                   R                  S5      nU R                  (       a  U R                  S   R                  nO$U R
                  c  [        S5      eU R
                  nU R                  X5      u  p4U(       aƒ  U R                  U   n[        U[        5      (       d   eU R                  R                  U5        U R                  5         U R                   (       a  U R                  5       $ U R                  5         gU R                  5         UR                  U4$ )z~Continue an in-progress rebase.

Returns:
    None if rebase is complete, or tuple of (commit_sha, conflicts) for next commit
Nr   éÿÿÿÿzNo onto commit set)r  Ú_finish_rebaseÚpopr'  r¶   r&  r   rL  r  r0  r   r~   rR  Ú	continue_)r>   r·   r¿   Únew_sharJ  rK  s         r.   rY  ÚRebaser.continue_2  s  € ð �z�zØ×ÑÔ!Øð —‘—‘ Ó"ˆð �:�:Ø—:‘:˜b‘>×$Ñ$‰Dà�z‰zÑ!Ü!Ð"6Ó7Ð7Ø—:‘:ˆDð "×.Ñ.¨vÓ<ÑˆæàŸ™ 7Ñ+ˆJÜ˜j¬&×1Ñ1Ð1Ð1Ø�J‰J×Ñ˜jÔ)Ø×#Ñ#Ô%ð �z�zØ—~‘~Ó'Ð'à×#Ñ#Ô%Øð ×#Ñ#Ô%Ø—I‘I˜yÐ)Ð)r-   c                 óH   • [        U R                  R                  5       5      $ )z+Check if a rebase is currently in progress.)r‘   r$  rÑ   rž   s    r.   Úis_in_progressÚRebaser.is_in_progress\  s   € ä�D×'Ñ'×.Ñ.Ó0Ó1Ð1r-   c                 ó*  • U R                  5       (       d  [        S5      eU R                  c  [        S5      e[        U R                  R
                  [        U R                  5        U R                  5         SU l        SU l        / U l	        / U l
        g)z7Abort an in-progress rebase and restore original state.úNo rebase in progressNzNo original HEAD to restore)r]  r   r%  r    r  r.  r   Ú_clean_rebase_stater&  r  r'  rž   s    r.   ÚabortÚRebaser.abort`  s~   € à×"Ñ"×$Ñ$ÜÐ5Ó6Ð6ð ×ÑÑ&ÜÐ;Ó<Ð<Ü˜Ÿ™Ÿ™¬°$×2EÑ2EÔFð 	× Ñ Ô"ð #ˆÔØˆŒ
ØˆŒ
Øˆ�
r-   c                 ó&  • U R                   (       d  gU R                   S   nU R                  (       a.  UR                  U R                  R                  U R                  '   OŒU R                  R                  [
           nUR                  S5      (       a2  [        USS 5      nUR                  U R                  R                  U'   O'UR                  U R                  R                  [
        '   U R                  5         SU l	        SU l
        / U l        g)z/Finish rebase by updating HEAD and cleaning up.NrV  rO  rP  )r'  r(  r¶   r  r.  r   rŠ   r   ra  r%  r&  r  )r>   Úlast_commitÚhead_refÚ
branch_refs       r.   rW  ÚRebaser._finish_rebases  sË   € à�z�zàð —j‘j ‘nˆð × × Ø4?·N±NˆD�I‰I�N‰N˜4×0Ñ0Ò1ð —y‘y—~‘~¤gÑ.ˆHØ×"Ñ" 8×,Ñ,Ü  ¨!¨" Ó.�
Ø-8¯^©^�—	‘	—‘˜zÒ*ð +6¯.©.�—	‘	—‘œwÑ'ð 	× Ñ Ô"ð #ˆÔØˆŒ
Øˆ�
r-   c                 ó¦   • U R                   R                  U R                  U R                  U R                  U R
                  U R                  5        g)z$Save rebase state to allow resuming.N)r$  rÄ   r%  r(  r&  r  r'  rž   s    r.   rR  ÚRebaser._save_rebase_state’  s=   € à×Ñ× Ñ Ø×ÑØ×!Ñ!Ø�J‰JØ�J‰JØ�J‰Jõ	
r-   c                 óv   • U R                   R                  5       u  U l        U l        U l        U l        U l        g)z&Load existing rebase state if present.N)r$  rÇ   r%  r(  r&  r  r'  rž   s    r.   r)  ÚRebaser._load_rebase_stateœ  s6   € ð ×Ñ×$Ñ$Ó&ñ	
ØÔØÔ!ØŒJØŒJØ�Jr-   c                 ó8   • U R                   R                  5         grü   )r$  rË   rž   s    r.   ra  ÚRebaser._clean_rebase_state¦  s   € à×Ñ×!Ñ!Õ#r-   )r'  r&  r%  r(  r$  r  r"  r  rº   ©NNr»   )r'   r(   r)   r*   r+   r"   r<   rB   rA   r   r:  r   rÚ   rL  rS  rY  r‘   r]  rb  rW  rR  r)  ra  r,   r%   r-   r.   r   r   ƒ  sñ   † Ù(ð"˜Tô "ð* 7;ñ/'Øð/'Ø',¨t¡|ð/'à	ˆf‰õ/'ðb0!Øð0!Ø$,ð0!à	ˆx˜$‰  U¡Ð+Ñ	,ô0!ðj "Ø#ñ	3àð3ð �d‰lð3ð ˜‘ð	3ð
 
ˆf‰õ3ðj(*˜5 ¨¨U©Ð!3Ñ4°tÑ;ô (*ðT2 ô 2ôô&ô>
ô'÷$r-   r   r  r+  r¿   r,  rT   c                 óÔ   • [        U 5      nUR                  XU5        UR                  5       nUb  [        US   5      eUR                   Vs/ s H  ofR
                  PM     sn$ s  snf )a–  Perform a git rebase operation.

Args:
    repo: Repository to rebase in
    upstream: Upstream branch/commit to rebase onto
    onto: Specific commit to rebase onto (defaults to upstream)
    branch: Branch to rebase (defaults to current branch)

Returns:
    List of new commit SHAs created by rebase

Raises:
    RebaseConflict: If conflicts occur during rebase
    RebaseError: For other rebase errors
rˆ   )r   rS  rY  r   r'  r¶   )r  r+  r¿   r,  ÚrebaserÚresultÚcs          r.   r   r   «  sb   € ô* �d‹m€Gð ‡M�M�( &Ô)ð ×ÑÓ €FØÑä˜V A™YÓ'Ð'ð "Ÿ-š-Ó(š-�Q�DŒD™-Ñ(Ð(ùÒ(s   ÁA%Úeditor_callbackc                 óð  • [        U 5      nUR                  XU5      nU(       d  [        S5      e[        R	                  U5      nU R                  5       nUR                  U5        U(       a‰  UR                  5       R                  S5      n	U" U	5      n
[        R                  U
R                  SSS95      nUR                  (       d  UR                  5         [        S5      eUnUR                  U5        U$ )as  Start an interactive rebase.

This function generates a todo list and optionally opens an editor for the user
to modify it before starting the rebase.

Args:
    repo: Repository to rebase in
    upstream: Upstream branch/commit to rebase onto
    onto: Specific commit to rebase onto (defaults to upstream)
    branch: Branch to rebase (defaults to current branch)
    editor_callback: Optional callback to edit todo content. If None, no editing.
                    Should take bytes and return bytes.

Returns:
    RebaseTodo object with the (possibly edited) todo list

Raises:
    RebaseError: If rebase cannot be started
zNo commits to rebaser4   r5   r²   z Rebase aborted - empty todo list)r   rS  r   r	   r¸   r#  rÕ   r‚   r�   rn   r6   r”   rb  r   )r  r+  r¿   r,  rt  rq  r°   rÀ   Ústate_managerr  Úedited_contentÚedited_todos               r.   r   r   Ï  sã   € ô4 �d‹m€Gð �m‰m˜H¨FÓ3€GæÜÐ0Ó1Ð1ô ×"Ñ" 7Ó+€Dð ×1Ñ1Ó3€MØ×Ñ˜DÔ!ö Ø—~‘~Ó'×.Ñ.¨wÓ7ˆÙ(¨Ó6ˆô !×,Ñ,Ø×!Ñ! '°)Ð!Ð<ó
ˆð
 ×"×"à�M‰MŒOÜÐ@ÓAÐAàˆð 	×Ñ Ô%à€Kr-   c                 ó`  • U R                  5       nUR                  5       (       d  [        S5      eUR                  5       nU(       d  [        S5      eUR	                  5       R                  S5      nU" U5      n[        R                  UR                  SSS95      nUR                  U5        U$ )a4  Edit the todo list of an in-progress interactive rebase.

Args:
    repo: Repository with in-progress rebase
    editor_callback: Callback to edit todo content. Takes bytes, returns bytes.

Returns:
    Updated RebaseTodo object

Raises:
    RebaseError: If no rebase is in progress or todo cannot be loaded
r`  ú!No interactive rebase in progressr4   r5   r²   )
r#  rÑ   r   rØ   r‚   r�   r	   rn   r6   rÕ   )r  rt  rv  rÀ   r  rw  rx  s          r.   r   r     sª   € ð ×1Ñ1Ó3€Mà×Ñ×!Ñ!ÜÐ1Ó2Ð2ð ×"Ñ"Ó$€DÞÜÐ=Ó>Ð>ð —>‘>Ó#×*Ñ*¨7Ó3€LÙ$ \Ó2€Nô ×(Ñ(Ø×Ñ˜g¨iÐÐ8ó€Kð
 ×Ñ˜KÔ(àÐr-   rÀ   c                 ó.  • U R                  5       n[        U 5      nUc"  UR                  5       nU(       d  [        S5      eUR	                  5       (       Gd‡  UR                  5       nU(       d  GOnUR                  =[        R                  :X  a    UR                  5       nUGbñ  g=[        R                  :X  Ga$    UR                  5       nUb  gUR                  (       Ga´  U(       Ga¬  UR                  S   nU" UR                  5      n[        5       n	UR                  U	l        UR                  U	l        UR                   U	l        UR"                  U	l        UR$                  U	l        UR&                  U	l        UR(                  U	l        UR*                  U	l        X‰l        UR,                  U	l        U R.                  R1                  U	5        X”R                  S'   GO·=[        R2                  :X  a7    UR                  5       nUb  gUR5                  5         UR7                  U5        g=[        R8                  :X  a2    UR                  (       d  [        S5      e[;        U UUSUS9n
U
S	:X  Ga'  g=[        R<                  :X  a0    UR                  (       d  [        S
5      e[;        XUSSS9n
U
S	:X  aã  g=[        R>                  :X  a.    UR@                  (       a¼  UR@                  RC                  S5        O =[        RD                  :X  a4    URF                  (       az   [H        RJ                  " URF                  SSS9  OX[        RN                  :X  a"  UR5                  5         UR7                  U5        g [        SUR                  RP                   35      eUR5                  5         UR7                  U5        URS                  5         UR	                  5       (       d  GM‡  URU                  5         g! [H        RL                   a  nSSU 34s SnA$ SnAff = f)a   Process an interactive rebase.

This function executes the commands in the todo list sequentially.

Args:
    repo: Repository to rebase in
    todo: RebaseTodo object (if None, loads from state)
    editor_callback: Optional callback for reword operations

Returns:
    tuple of (``is_complete``, ``pause_reason``):

    * ``is_complete``: True if rebase is complete, False if paused
    * ``pause_reason``: Reason for pause (e.g., "edit", "conflict", "break") or None

Raises:
    RebaseError: If rebase fails
Nrz  )FÚconflictrV  )FrJ   ú'Cannot squash without a previous commitT)Úkeep_messagert  r|  z&Cannot fixup without a previous commitFr   )ÚshellÚcheckzexec failed: )FrN   zUnsupported rebase command: )TN)+r#  r   rØ   r   r¥   rŸ   rt   r
   r`   rY  ra   r'  rµ   r   r>  r1  r?  r@  rA  rB  rC  rD  rE  r"  rF  rb   r¢   rÕ   rc   Ú_squash_commitsrd   rg   r  rX  re   rw   Ú
subprocessÚrunÚCalledProcessErrorrf   r}   rR  rW  )r  rÀ   rt  rv  rq  r˜   rr  re  Únew_messagerK  Úconflict_resultrX   s               r.   r   r   6  s[  € ð. ×1Ñ1Ó3€MÜ�d‹m€Gð �|Ø×&Ñ&Ó(ˆÞÜÐAÓBÐBð ×Ñ× Ò Ø× Ñ Ó"ˆÞÙð �m‰mØ'Ô"×'Ö'à ×*Ñ*Ó,�ØÒ%à,à)Ô"×)×)à ×*Ñ*Ó,�ØÑ%à,ð —=—=�=§_Ø")§-¡-°Ñ"3�KÙ"1°+×2EÑ2EÓ"F�Kô "(£�JØ&1×&6Ñ&6�J”OØ)4×)<Ñ)<�JÔ&Ø(3×(:Ñ(:�JÔ%Ø-8×-DÑ-D�JÔ*Ø1<×1LÑ1L�JÔ.Ø+6×+@Ñ+@�JÔ(Ø-8×-DÑ-D�JÔ*Ø1<×1LÑ1L�JÔ.Ø)4Ô&Ø*5×*>Ñ*>�JÔ'à×%Ñ%×0Ñ0°Ô<ð )3—M‘M "Ó%à'Ô"×'Ö'à ×*Ñ*Ó,�ØÑ%à,ð —‘”Ø×'Ñ'¨Ô-Ø$à)Ô"×)Ö)à—}—}Ü%Ð&OÓPÐPä"1ØØØØ!%Ø$3ñ#�ð # jÔ0Ø,à(Ô"×(Ö(à—}—}Ü%Ð&NÓOÐOä"1Ø 5°uÈdñ#�ð # jÓ0Ø,à'Ô"×'Ö'à—=—=Ø—M‘M×%Ñ% aÕ(à'Ô"×'Ö'à—?—?ð:Ü"Ÿš u§¡¸dÈ$ÓOô
 #×(Õ(à—‘”Ø×'Ñ'¨Ô-Ø%àä!Ð$@ÀÇÁ×ATÑATÐ@UÐ"VÓWÐWð 	�‰Œð 	×Ñ Ô%Ø×"Ñ"Ô$ð_ ×Ñ× Ô ðd ×ÑÔØøô/ &×8Ñ8ó :à$¨°a°SÐ&9Ð9Õ9ûð:ús   Ì O/ Ï/PÐPÐ	PÐPrq  r˜   r~  c                 óè  • UR                   (       d  [        S5      eUR                  (       d  [        S5      eXR                     n[        U[        5      (       d!  [        S[        U5      R                   35      eUR                   S   nXR                  S      n[        U[        5      (       d!  [        S[        U5      R                   35      e[        U R                  XvU5      u  p‰U	(       a  gU(       a,  UR                  S-   UR                  -   n
U(       a  U" U
5      n
OUR                  n
[	        5       nUR                  Ul        UR                  Ul        UR                  Ul        UR                  Ul        UR                  Ul        UR                   Ul        UR"                  Ul        UR$                  Ul        X«l
        UR&                  Ul        U R                  R)                  U5        U R                  R)                  U5        X±R                   S'   UR*                  (       aB  UR*                  S   R                  UR                  :X  a  UR*                  R-                  S5        g	)
a`  Helper to squash/fixup commits.

Args:
    repo: Repository
    rebaser: Rebaser instance
    entry: Todo entry for the commit to squash
    keep_message: Whether to keep this commit's message (squash) or discard (fixup)
    editor_callback: Optional callback to edit combined message (for squash)

Returns:
    None on success, "conflict" on conflict
r}  z(No commit SHA for squash/fixup operationzExpected commit, got rV  r   zExpected parent commit, got r|  s   

N)r'  r   ru   r0  r   Útyper'   r1  r   r"  rµ   r¶   r>  r?  r@  rA  rB  rC  rD  rE  rF  r  rX  )r  rq  r˜   r~  rt  Úcommit_to_squashÚprevious_commitrG  rI  rJ  Úcombined_messagerK  s               r.   r�  r�  Í  s  € ð& �=�=ÜÐCÓDÐDð ××ÜÐDÓEÐEØ×,Ñ,Ñ-ÐÜÐ&¬×/Ñ/ÜÐ1´$Ð7GÓ2H×2QÑ2QÐ1RÐSÓTÐTð —m‘m BÑ'€Oð ×*Ñ*¨1Ñ-Ñ.€FÜ�fœf×%Ñ%ÜÐ8¼¸f»×9NÑ9NÐ8OÐPÓQÐQô -Ø×Ñ˜6Ð4DóÑ€Kö Øö Ø*×2Ñ2°WÑ<Ð?O×?WÑ?WÑWÐÞÙ.Ð/?Ó@Ðøà*×2Ñ2Ðô “€JØ!—n‘n€J„OØ(×0Ñ0€JÔØ'×.Ñ.€JÔØ,×8Ñ8€JÔØ!0×!@Ñ!@€JÔØ+×5Ñ5€JÔØ-×9Ñ9€JÔØ!1×!AÑ!A€JÔØ)ÔØ)×2Ñ2€JÔà×Ñ× Ñ  Ô-Ø×Ñ× Ñ  Ô,ð #‡M�M�"Ñð ‡}‡}˜Ÿ™ qÑ)×,Ñ,Ð0@×0CÑ0CÓCØ�‰×Ñ˜!Ôàr-   ro  )NNNrº   )6r+   Ú__all__ræ   rý   r‚  Úcollections.abcr   r   Údataclassesr   Úenumr   Útypingr   r   Údulwich.graphr   Údulwich.merger   Údulwich.objectsr   r   Údulwich.objectspecr   Údulwich.refsr   r   r   r    Údulwich.repor!   r"   Ú	Exceptionr   r   r   r
   r   r	   r   r   r   r   r   rB   rA   r   r   r   rÚ   r‘   rq   r   r�  r%   r-   r.   Ú<module>r˜     s^  ðñ, !ò€ó$ 
Û Û ß .Ý !Ý ß &å )Ý )ß ,Ý +ß JÓ Jß 'ô(�)ô (ô
�[ô 
ô)�+ô )ô3=˜ô 3=ðl ÷i
ð i
ó ði
÷XQñ Qôh(˜ô (÷Vvñ vôr�)ô ÷Jñ J÷Ze$ñ e$ðV	 Øñ	!)Ø
ð!)àð!)ð �$‰,ð!)ð �D‰Lð	!)ð
 
ˆ%�[õ!)ðN ØØ7;ñ>Ø
ð>àð>ð �$‰,ð>ð �D‰Lð	>ð
 ˜u˜g u˜nÑ-°Ñ4ð>ð õ>ðB#�Dð #¨8°U°G¸U°NÑ+Cð #È
ô #ðP #Ø7;ñTØ
ðTà
�tÑ
ðTð ˜u˜g u˜nÑ-°Ñ4ðTð ˆ4��t‘ÐÑõ	Tðx 8<ñLØ
ðLàðLð ðLð ð	Lð
 ˜u˜g u˜nÑ-°Ñ4ðLð 	ˆ4�ZöLr-   