
    q&f                     8    d dl Z ddlmZ ddlmZ ddlmZ ddZy)    N   )_)short)errorc                 h   | j                   j                  }g }t               }t               }t               }	t               }
|s9|j                         5 }|j	                  di       j                         }ddd       |#d|d<   d|d<   d|d<   d|d<   d|d	<   d|d
<   d|d<   | j                   j                         | j                  k(  r_|
j                  | j                         || j                  gk7  r$| j                  g| j                  gt        |      fS | j                  gg |fS | j                  j                  t        d             g }|D ]-  } ||      s|j                  |       |
j                  |       / |st        |
      g t        |      fS t        |      }d}| j                  j                  t        d      t        d            }|j                         5 }|F|d	xx   t        |      z  cc<   |d
xx   t        |      z  cc<   |dxx   dz  cc<   |dxx   dz  cc<   |j	                  dd|i      j                         }ddd       t!        j"                        }|r:g }|r|j%                         }|d   |v r| j                  j'                  dt)        |d         t)        |d         fz         |d   | j                  k(  rnN||	v r| j                  j'                  d       |d   ri ||d         r^| j                  j'                  dt)        |d         t)        |d         fz         |j                  |dd        |	j                  |       n|d   |vr|d   |vrx ||d         rI ||d         r>| j                  j'                  dt)        |d         z         |j                  |d          |dd D ]  } ||      s|
j                  |        |dd D ]2  }||vs ||      r|j                  |       |j                  |       4 |j                  |d          |r|rdt+        dt        |      d      D ]J  }|dz  }|j-                          | j                  j.                  rAd}||dj1                  t3        t(        |            fz  }| j                  j'                  |       |j                         5 }|||dz    }|F|d	xx   t        |      z  cc<   |d
xx   t        |      z  cc<   |dxx   dz  cc<   |dxx   dz  cc<   |j	                  dd|i      j                         }ddd       |D ]K  }| j                  j'                  dt)        |d         t)        |d         fz         |j                  |       M M |r:|rg }|dz  }|j-                          |j                         5 }|F|d	xx   t        |      z  cc<   |dxx   t        |      z  cc<   |dxx   dz  cc<   |dxx   dz  cc<   |j	                  dd|i      j                         }ddd       t5        |      D ]  \  }}|j                  |d          |d   }d}|D ]  }| j                  j'                  d|t        |      t)        |      fz          ||      r|dk  rJ| j                  j'                  d t)        |      z         |j                  |       |
j                  |       nE| j                  j'                  d!t)        |      t)        |      fz         |j                  ||f        n	||dz  }} |} |r|D ]7  } ||      st7        j8                  t        d"      t)        |dd       z          t        |
      }
|
| j                  gk(  rE|r%| j                  j;                  t        d#             nt7        j<                  t        d$            | j                  j'                  d%dj1                  |D cg c]  }t)        |       c}      z   d&z          |j?                          | j                  j'                  d'|z         |
t        |      |fS # 1 sw Y   	xY w# 1 sw Y   ;xY w# 1 sw Y   MxY w# 1 sw Y   fxY wc c}w )(an  Return a tuple (common, fetch, heads) used to identify the common
    subset of nodes between repo and remote.

    "common" is a list of (at least) the heads of the common subset.
    "fetch" is a list of roots of the nodes that would be incoming, to be
      supplied to changegroupsubset.
    "heads" is either the supplied heads, or else the remote's heads.
    s   headsNr   s   total-roundtripss   total-roundtrips-headsr   s   total-roundtrips-branchess   total-roundtrips-betweens   total-queriess   total-queries-branchess   total-queries-betweens   searching for changes
s	   searchings   queries)units   branchess   nodess   examining %s:%s
s   branch already found
s   found incomplete branch %s:%s
      s   found new changeset %s
   
   s   request %d: %s
    s   received %s:%s
s   betweens   pairss   narrowing %d:%d %s
s   found new branch changeset %s
s    narrowed branch search to %s:%s
s   already have changeset s!   warning: repository is unrelated
s   repository is unrelateds!   found new changesets starting at    
s   %d total queries
) 	changeloghasnodesetcommandexecutorcallcommandresulttipnullidaddlistuistatusr   appendmakeprogresslencollectionsdequepopleftdebugr   range	increment	debugflagjoinmapzipr   	RepoErrorwarnAbortcomplete)reporemoteheadsforceaudit	knownnodesearchfetchseen
seenbranchbaseeunknownhreqreqcntprogressbranchesrnpmsgsubsetb	newsearchbetweenlfis                                9/usr/lib/python3/dist-packages/mercurial/treediscovery.pyfindcommonincomingrJ      sL    &&IFEE5DJ5D##% 	9MM(B/668E	9 %&!"+,'(./*+-.)*"#+,'(*+&'~~t{{*T[[M!KK=4;;-e<<}b%'' 	GGNN1/01G |NN1HHQK	 Dz2tE{**
g,CFww##AlO!J-#HH 
			! LQ"#s7|3#+,G<,%&!+&./14/==x.ABIIKL )G
!Att|GGMM.%!+uQqT{1KKLtt{{"j781)AaD/6QqT{E!A$K01 a!f%q!Q4t#!E(9 19QqT?&AE!A$K&OP		!A$qV ($Q< HHQK( 1Q #A|IaL
# HHQqTN? B 1c!fb) &!""$77$$-CFDIIc%m$<==CGGMM#&++- q1r6]F(./3v;>/78CKG812a72:;q@; }}#$f 
 fh  " &AGGMM+uQqT{E!A$K.HH NN1%	&+&I @ 	!##% 	M &'3v;6'./3v;>/)*a/*12a72mmJ60BCJJLG	M ( 	DAqHHQqTN!AA  5CFE!H8MMNQ<Av>qI 		!@$Qxq23 "((!Q0!a%1! " F+	 J  PQ<//!$>"?%"1,"NOOP :D}GGLL@AB++a :;<<GGMM,
))u-!U1X-
.	/
	 GGMM'&01ee##U	9 	9PL Lh 4	M 	MZ .s9   !a;$A+bA3bA+b"b/;bbb	"b,)NFN)r   i18nr   noder    r   rJ        rI   <module>rP      s      
|$rO   