6hQ6SSKJr SSKJrJr SSKJr SSKJrJ r J r J r SSK J r JrJrJrJrJrJr SSKJr SSKJr SS KJrJrJr \R:"5r"S S 5r"S S 5r "SS\5r"SS\5r!"SS\\RD5r#g)) annotations)IterableIterator)_)binhexnullrevsha1nodeconstants)ancestor changelogdagopencodingerrormanifestpycompat) repository) stringutil)gitutilindexrc\rSrSrSrSrSSjrSrSSjrS Sjr S!S jr S"S jr S r S r S"S jrSrS#SjrSrSrSrSrSrSrSrS$SjrS%SjrSrSrSrSrSrg)&baselog&z9Common implementations between changelog and manifestlog.cXlX lgN)gitrepo_db)selfgrdbs 2/usr/lib/python3/dist-packages/hgext/git/gitlog.py__init__baselog.__init__)s  cl[URRS5R5S5$)NzSELECT ncommits FROM cacher)intrexecutefetchoners r!__len__baselog.__len__-s+488##$@AJJLQOPPr$c[erNotImplementedErrorr)s r!files baselog.files0!!r$c[err-)rexclusivefiles sharedfilesrevisionscount trackedsize storedsizes r! storageinfobaselog.storageinfo3 "!r$c[err-)rstates r!verifyintegritybaselog.verifyintegrity=r1r$Nc[err-rstartstops r!revs baselog.revs@r1r$c[err-)rdeltas linkmapper transaction addrevisioncbduplicaterevisioncbs r!addgroupbaselog.addgroupCr:r$c[err-)rnode1node2s r!commonancestorsheadsbaselog.commonancestorsheadsMr1r$c[err-rrCs r! descendantsbaselog.descendantsPr1r$c[err-r@s r!heads baselog.headsSr1r$c[err-rnodes r!childrenbaselog.childrenVr1r$c[err-)rnodes nodesorder revisiondataassumehaveparentrevisionss r! emitrevisionsbaselog.emitrevisionsYs "!r$c[err-)rminlinks r! getstrippointbaselog.getstrippointbr1r$c[err-rrevs r! iscensoredbaselog.iscensoreder1r$c[err-rjs r! parentrevsbaselog.parentrevshr1r$c[err-rZs r!rawdatabaselog.rawdatakr1r$c[err-rZs r!revisionbaselog.revisionnr1r$c[err-rjs r!size baselog.sizeqr1r$c[err-)rrfrHs r!strip baselog.striptr1r$c [err-) rrarHlinkrevp1p2r[flags cachedeltas r! addrevisionbaselog.addrevisionws "!r$c[err-)rtrr[ tombstones r!censorrevisionbaselog.censorrevisionr1r$cU[R:XagURRS[R "U545R 5nUc![R"US[S55eUS$)Nz(SELECT rev FROM changelog WHERE node = ? 00changelog.ino noder) r nullidrr'r togitnoder(r LookupErrorrrnts r!rk baselog.revso !(( ( HH   69J9J19M8O (*  9##A'7:G Gt r$cU[:Xa[R$URR SU45R 5nUc$[ R"SU-S[S55e[US5$)Nz(SELECT node FROM changelog WHERE rev = ?%drno revr) r r rrr'r(rrrr)rrrs r!r[ baselog.nodesm <$++ + HH   6 (*  9##EAI/?9N N1Q4yr$cURRS[R"U545R 5nUbUScU$[ US5$)aZMap any node to a non-synthetic node. Indexing may have created synthetic nodes to handle octopus merges. Certain operations on these made up nodes need to actually happen on the real octopus merge commit. Given any node, this function returns the real commit hash. One can think of this as hg-to-git commit hash translation that always works.z.SELECT synthetic FROM changelog WHERE node = ?r)rr'rrr(rrs r! syntheticbaselog.syntheticsZ HH   <   q ! #  (*  9! H1Q4yr$cURRS[R"U545R 5nUSL$)Nz)SELECT node FROM changelog WHERE node = ?)rr'rrr(rs r!hasnodebaselog.hasnodesB HH   7   q ! #  (* }r$)rr)returnr&)FFFFF)rz#Iterable[repository.iverifyproblem]rNNN)NFF)NrN)r$)__name__ __module__ __qualname____firstlineno____doc__r"r*r/r8r=rCrKrPrTrWr\rcrgrlrorrrurxr{rrrkr[rr__static_attributes__r$r!rr&sCQ"  """ """"" "' """""""" "" r$rc8\rSrSrSrSrSrSrSrSr Sr g ) baselogindexcXlgr_log)rlogs r!r"baselogindex.__init__s r$c>URRU5S:g$Nrrrk)rrs r!has_nodebaselogindex.has_nodesyy}}Q2%%r$c,[UR5$r)lenrr)s r!r*baselogindex.__len__s499~r$c URRU5up#UUUSUUUURRU54$r)rror[)ridxp1revp2revs r! __getitem__baselogindex.__getitem__sIyy++C0         IINN3   r$c8URRU5$rrrZs r!rkbaselogindex.revsyy}}T""r$c8URRU5$r)rget_revrZs r!rbaselogindex.get_revsyy  &&r$rN) rrrrr"rr*rrkrrrr$r!rrs & $#'r$rc \rSrSrSrSrSr\S5r\S5r \S5r Sr S S jr S r S rS rS!SjrS"SjrSrS#SjrSrS"SjrS$SjrS$SjrSrS%SjrSrSrSr\rSrSrSr S&Sjr!Sr"g )'r sextrac\URU5 g![Ra gf=f)NTF)r[rrrjs r! __contains__changelog.__contains__s-  IIcN    s ++c<[[[U555$r)iterrangerr)s r!__iter__changelog.__iter__sE#d)$%%r$c[5$r)setr)s r! filteredrevschangelog.filteredrevss u r$c[U5$r)rr)s r!rchangelog.indexs D!!r$cURRS5Vs0sHn[US5US_M nn[U[R 'U$s snf)NzSELECT node, rev FROM changelogrr)rr'rr r r)rvrs r!nodemapchangelog.nodemapsaXX%%&GH H !IqtOH  '.  " "#  sAcURRS5R5nU(a[US5$[R $)Nz4SELECT node FROM changelog ORDER BY rev DESC LIMIT 1r)rr'r(rr rrrs r!tip changelog.tipsB HH   B (*  qt9  '''r$NctUcUR5nURRSX45nSU5$)NzFSELECT rev FROM changelog WHERE rev >= ? AND rev <= ? ORDER BY REV ASCc3># UHn[US5v M g7fr)r&).0rs r! !changelog.revs.. s%1aAaD 1s)tiprevrr')rrArBrs r!rCchangelog.revss? <;;=D HH   M   &1%%r$cfURRS5R5nUbUS$g)Nz3SELECT rev FROM changelog ORDER BY REV DESC LIMIT 1rr)rr'r(rs r!rchangelog.tiprev s6 HH   G (*  =Q4Kr$c[RRU5(a[ReUR R S[R"US-545Vs/sHn[US5PM nn[RRU5(aUR[R5 [U5S:a![R"US[S55eU(aUS$gs snf)Nz,SELECT node FROM changelog WHERE node LIKE ?%rrrsambiguous identifier)r wdirhex startswithrWdirUnsupportedrr'rsysstrrnullhexappendrrAmbiguousPrefixLookupErrorr)ridx candidatess r! _partialmatchchangelog._partialmatchs  $ $ / / 3 3'' 'XX%%>d+-  !I    $ $ / / 3 3   /66 7 z?Q 22$a(?&@  a=  s+Dcg)Nrrrjs r!rchangelog.flags)sr$c [U5n[U[U5S-5H`nUSUn[URR S[ R"US-545R5S5nUS:XdM^Us $ U$)Nrz0SELECT COUNT(*) FROM changelog WHERE node GLOB ?*r) rrrr&rr'rrr()rr[ minlengthnodehexattempt candidatematchess r!shortestchangelog.shortest,sd)YG q(89G)I  F__Y%568(*Q G !|  :r$cURRS5Vs/sHn[US5PM nnU(a#[UVs/sH oDU;dM UPM sn5$[U5$s snfs snf)NzISELECT rev FROM changelog INNER JOIN heads ON changelog.node = heads.noder)rr'r&sorted)rrCr realheadsrs r!headrevschangelog.headrevs:s}XX%%B  !I   d=d9n1d=> >i   >sA- A2A2c [U[5(aURU5nOUnSS0nU[R:Xa#[ R "U[RS9$URU5n[R"U5n[R"URURUSS9 URRSU[R45Vs/sHnUSPM nnURRSU[R45Vs/sHnUSPM nnURUn[ R "US UR R"R%S 5UR R&R%S 54-UR R(UR R**S -4UUUR,R%S 5US 9$s snfs snf) Nsbranchdefault)extrarT)commitzBSELECT filename FROM changedfiles WHERE node = ? and filenode != ?rzASELECT filename FROM changedfiles WHERE node = ? and filenode = ?s%s <%s>utf8<)ruserdater/ filesremoved descriptionr) isinstancer&r[r r hgchangelog_changelogrevisionrrrr_index_repo_commitrrr'nullgitauthornameencodeemailtimeoffsetmessage) r nodeorrevrrhnrr/r cs r!changelogrevisionchangelog.changelogrevisionFs i % % )$AAJ' !(( (11&7&>&>  NN1    q !   txxDIXX%%3W__%  aD  XX%%2W__%  aD   LL --xx}}##F+QXX^^-B-B6-JKL((--!((//!1B!67% ((0  #  s %G0$G5c[U5nURUR55nUHnXT:dM [SU-5e [R "UR XUS9$)NsInvalid rev %r)stoprev inclusive)listrkr IndexErrorr lazyancestorsro)rrCr r!rrs r! ancestorschangelog.ancestorsts_Dzhhtxxz"Aw !2Q!677%% OOTi  r$cX[R"XRUR5$r)r descendantrevsrCrorSs r!rTchangelog.descendantss##D))T__EEr$cXUc[/n[R"URU5$)aReturn an object that can be used to incrementally compute the revision numbers of the ancestors of arbitrary sets that are not ancestors of common. This is an ancestor.incrementalmissingancestors object. 'common' is a list of revision numbers. If common is not supplied, uses nullrev. )r r incrementalmissingancestorsro)rcommons r!incrementalmissingrevs changelog.incrementalmissingrevss' >YF33DOOVLLr$c|Uc[/nUcUR5nURUS9nURU5$)a(Return the revision numbers of the ancestors of heads that are not ancestors of common. More specifically, return a list of revision numbers corresponding to nodes N such that every N satisfies the following constraints: 1. N is an ancestor of some node in 'heads' 2. N is not an ancestor of any node in 'common' The list is sorted by revision number, meaning it is topologically sorted. 'heads' and 'common' are both lists of revision numbers. If heads is not supplied, uses all of the revlog's heads. If common is not supplied, uses nullid.r,)r rr-missingancestors)rr,rWincs r!findmissingrevschangelog.findmissingrevssD >YF =MMOE)))8##E**r$cUc[R/nUc.UR5Vs/sHo0RU5PM nnUVs/sHo@R U5PM nnUVs/sHo@R U5PM nnUR US9nUR U5Vs/sHo0RU5PM sn$s snfs snfs snfs snf)aReturn the ancestors of heads that are not ancestors of common. More specifically, return a list of nodes N such that every N satisfies the following constraints: 1. N is an ancestor of some node in 'heads' 2. N is not an ancestor of any node in 'common' The list is sorted by revision number, meaning it is topologically sorted. 'heads' and 'common' are both lists of node IDs. If heads is not supplied, uses all of the revlog's heads. If common is not supplied, uses nullid.r0)r rrr[rkr-r1)rr,rWrrr2s r! findmissingchangelog.findmissings >'../F =+/==?;?aYYq\?E;'-.v!((1+v.&+,e!e,)))8&)&:&:5&AB&A ! &ABB <.,CsC C *C(Cc/nURU5nURUS-S9HnURU5Vs/sHoU[:wdMUPM nnU(a2UH*nXS:XdM UR UR U55 M, MhU[:XdMtUR UR U55 M U$s snf)z!find the children of a given noder)rA)rkrCror rr[)rr[rprprprevss r!r\changelog.childrens  HHTNQ'A"&//!"4F"4Bg R"4EFBw1. g1&(Gs C CcF[R"URXX$5$r)r _reachablerootspurero)rminrootrWroots includepaths r!reachablerootschangelog.reachablerootss (( OOWU  r$cfURU5URU5p!URX5$r)rk isancestorrevrabs r! isancestorchangelog.isancestors*xx{DHHQK1!!!''r$c hU[:XagX:XagX:ag[URX/U/SS95$)NTF)rA)r boolrBrFs r!rEchangelog.isancestorrevs= < V UD''3'GHHr$c4US:dU5eURRSU45R5nUc$[R"SU-S[ S55eUR [US55UR [US554$)Nrz*SELECT p1, p2 FROM changelog WHERE rev = ?rrrr)rr'r(rrrrkr)rrkrs r!rochangelog.parentrevssaxx HH   83& (*  9##ECK1A1Y<P PxxAaD "DHHS1Y$777r$cURU5URU5p![R"URX5Vs/sHnUR U5PM sn$s snfr)rkr rPror[)rrGrHrs r!rPchangelog.commonancestorsheadss[xx{DHHQK1224??AI I IIaLI   sA#cg)zAGit doesn't do named branches, so just put everything on default.)rFrrjs r! branchinfochangelog.branchinfos r$cgrr)rrs r! delayupdatechangelog.delayupdates r$c 0/n[R"U5[R"U5nnU[R:waUR U5 U(a%U[R:waUR U5 UceUunn[ R [R"[R"U55[R"[R"U55[U5[US-5*5nURRSUUU[R"U5U5nURRR!SUSS9 ["R$"URUR&5 UR($)Nr zrefs/hg/internal/latest-commitT)force)rrr rrpygit2 Signaturer unifromlocalrpersonrr&r create_commit referencescreater _index_reporraw)rrr/descrHrrr r rp1copiesp2copies filesaddedr parentshp1hp2 timestamptzsigoids r!add changelog.addsB $$R('*;*;B*?S ")) ) NN3  ")000 NN3  2  ! !*"3"3D"9 :  ! !*"2"24"8 9  N r]N   ll(( #sD'"3"3H"=w  && ,c ' $,,1wwr$rr)rr)rFr)F)NNNNNN)#rrrr_copiesstoragerrpropertyrrrrrCrrrrrrr%rTr-r3r6r\rBrIrEro_uncheckedparentrevsrPrSrVrnrrr$r!r r sN& ""( &(  !, \ F M+0C4  ( I8& ! +r$r c$\rSrSr\rSrSrSrg) manifestlogi0c&URSU5$Nr$)getrZs r!rmanifestlog.__getitem__3sxxT""r$cU[R:Xa[R"X5$UR U5nUR [ R"U5nURnU(a7URS5nUH nXFnUR URnM" [R"UR U5$)N/) r rrmemtreemanifestctxrrrrtreesplitr gitmanifestgittreemanifestctx)rrelpathr[rrpartsr9tes r!rwmanifestlog.get6s $++ +..t= =~~d#g//56 KK MM$'ETLL'--dllA>>r$rN) rrrrr nodeconstantsrrwrrr$r!rtrt0s%M# ?r$rtcl^\rSrSrU4SjrSrSrSrSSjrSSjr Sr S r S r S r S rS rU=r$)filelogiEc>[TU]X5 [U[5(deX0l[ R Ulgr)superr"rbytespathr r)rrr r __class__s r!r"filelog.__init__Fs5  $&&&& '.. r$cU[R:XagUR[R"U5R $rv)r rrrrdatarZs r!read filelog.readLs4 $++ +||G--d34999r$cF[U5S;a [U5n[U[5(aS5e[U5S:Xa [U5n[R "U5nX R ;aU$[R"URU[S55e)N)(stodo revnums for nodesrsno match found) rr&rrrrrrrrr)rr[hnodes r!lookupfilelog.lookupQs t9H $t9D dC 33 35 t9?t9D!!$' LL K 43D1EFFr$c*URU5U:g$)z9Returns True if text is different than content at `node`.)r)rr[texts r!cmp filelog.cmp]syy$&&r$c^U(aeURRU5R$r)r create_blobrb)rrmetarHlinkrrs r!rn filelog.addas$x||''-111r$c## URRS[R"UR5[ R 45H nUSv M g7f)Nz SELECT rev FROM changelog INNER JOIN changedfiles ON changelog.node = changedfiles.node WHERE changedfiles.filename = ? AND changedfiles.filenode != ? r)rr'rfsdecoderrr)rclrevs r!rfilelog.__iter__esKXX%%   tyy )7?? ;  E(N sAAcU$rr)rfrs r!r~filelog.linkrevps r$c6URRS[R"UR5[ R "U545R5nUc+[R"URU[S55e[US5$)Nz SELECT rev FROM changelog INNER JOIN changedfiles ON changelog.node = changedfiles.node WHERE changedfiles.filename = ? AND changedfiles.filenode = ?rr) rr'rrrrrr(rrrr&)rr[rows r!rk filelog.revss~hh A  tyy )7+<+rs"  '    JJZ ' 'HVVr ?'?*agz..ar$