o ]Lb@sddlmZddlZddlZddlZddlZddlZddlZddlm Z ddl m Z m Z m Z ddlmZddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ m!Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z*m+Z+m,Z,m-Z-m.Z/m0Z1ddl2m3Z4dd l5m6Z6m7Z7m8Z8ej9Z9d Z:d d Z;d dZddZ?dVddZ@gZA dWddZB     dXddZ3dYddZCdd ZDd!d"ZE     dZd#d$ZFd%d&ZGd'd(ZHd[d)d*ZId[d+d,ZJd-d.ZK    d\d/d0ZLd1d2ZM          d]d3d4ZNd^d5d6ZOd[d7d8ZPd_d9d:ZQeQZRd`d;d<ZSeSZTe jUe jVe jWe jXhZYd_d=d>ZZ   dad?d@ZdAdBZ[  d_dCdDZ\d[dEdFZ]d[dGdHZ^dIdJZ_dKdLZ`d[dMdNZad[dOdPZ.dQdRZbgdSZcGdTdUdUedZedS)b)absolute_importN)_)hexsha1nodeconstantsshort)getattr) bookmarks bundlerepocmdutildestutil discoveryerrorexchange extensionsgraphmodhttppeer localrepolock logcmdutil logexchangemerge mergestate narrowspecphases requirementsscmutilsshpeerstatichttprepoui unionrepourlutilverifyvfs) repository)hashutil stringutilurlutil bookmarksc Cstt|}z t|}t|j}Wn&tt fy1}zt t d|t |fd}~wty;d}Ynw|r@tpAtS)Nsinvalid path %s: %sF)r" expandpathr( urllocalpathosstatS_ISREGst_mode TypeError ValueErrorrAbortrr' forcebytestrOSErrorr r)pathstisfileer9./usr/lib/python3/dist-packages/mercurial/hg.py_localFs   r;c s|}|\}}|s |s pd}rd}||fSd}||fSr'tng|dsB|r7ttd|dfS|}|di Wdn1sYwYfdd} |D]} | | swt td| qh|r| |s|dfS)Nrs branchmaps"remote branch lookup not supportedcsP|dkrs ttdj}|vr&ddt|DdSdS)N.sdirstate branch not accessiblecss|]}t|VqdSN)r).0rr9r9r: ysz1addbranchrevs..primary..TF)rr2rdirstatebranchextendreversed)rB branchmaplreporevsr9r:primaryss zaddbranchrevs..primarysunknown branch '%s') peerlistcapablerr2rappendcommandexecutor callcommandresultRepoLookupError) rGotherbranchesrHrJ hashbranchxyr8rIrBr9rEr: addbranchrevs[s:        rW)bundlesunionfileshttpshttpssshs static-httpcCsVt|}|jp d}t|ptd}z||WSty*t|ds&|YSw)NrYsinstance)r(r!schemeschemesgetr0r" safehasattr)r5ur[thingr9r9r: _peerlookups     racCs8t|trzt||WStyYdSw|S)z7return true if repo (or path pointing to repo) is localF) isinstancebytesraislocalAttributeErrorlocalrepor9r9r:rds  rdTcCs8tj|ddd}|rt|dStj|||dS)z0open path with open if local, url.open if remoteF) parsequery parsefragmentsrb) sendaccept)r(r!rdr" posixfile localpathopen)rr5rkpathurlr9r9r:openpathsrpFc Cst|j|||||d}t|d|}|pgD]}|||q|ddtdD}t|D]6\} } |dd| t| dd} | retd |  } | ||Wdn1sXwY|dd | | q/Wdn1spwY|dd ||stD]}|||q|S) 1return a repository object for the specified pathintents createoptsrs extensions- executing reposetup hooks z all reposetups - running reposetup for %s reposetupNz reposetup %rs > reposetup for %s took %s s> all reposetup took %s ) rainstancerlogr"timedcmrrfwirepeersetupfuncs) rr5create presetupfuncsrsrtobjfallreposetupstatsnamemodulehookstatsr9r9r: _peerorrepos4          rcCsDt||||||d}|}|sttd|p||dS)rq)r{rsrtsrepository '%s' is not localsvisible)rrfrr2rr!filtered)rr5rzr{rsrtrJrhr9r9r:r%s  r%cCs t||}t|||||dS)z/return a repository peer for the specified pathrr)remoteuirrJ)uiorrepooptsr5rzrsrtruir9r9r:rJs  rJcCs(t|j}|s dStjtj|S)a9return default destination of clone if none is given >>> defaultdest(b'foo') 'foo' >>> defaultdest(b'/foo/bar') 'bar' >>> defaultdest(b'/') '' >>> defaultdest(b'') '' >>> defaultdest(b'http://example.org/') '' >>> defaultdest(b'http://example.org/foo/') 'foo' r)r(r!r5r,basenamenormpath)sourcer5r9r9r: defaultdests rcCs^|j|jkrdSt|dr|jr|jS|j|jd}t|\}}t |j |}||_|S)z}Returns repository object for source repository of a shared repo. If repo is not a shared repository, returns None. Nssrcrepor) sharedpathr5r"r^srcrepor$splitr(parseurlr%r)rhrsrcurlrSrr9r9r:sharedreposource s  rcCst|s ttd|st|}nt||d}t|tr7t||\}}}t ||} t | | |d\} } n| } d} t } |rG| tt ||d| || dd} t| | |dt ||} t| || d| S) zcreate a shared repositorys!can only share local repositoriesrNT)s sharedrepossharedrelatives shareditemsrzrt) defaultpath)checkout)rdrr2rrr(get_clone_pathrbrcr%rWrfsetaddsharedbookmarks postshare_postshareupdate)rrdestupdater rrelative origsourcerSrrevr shareditemsr?r9r9r:shares6      rcCst|j}t|j}|dsdSd}|dr|d}|dd"}|d}|d|||d||WddS1sIwYdS)zcopies the source repo config and prepend it in current repo .hg/hgrc on unshare. This is only done if the share was perfomed using share safe method where we share config of source in shareshgrcNrswbs## Config copied from shared source  )vfsmodr$rr5existsreadwrite)rhsrcvfsdstvfs currentconfigfp sourceconfigr9r9r:_prependsourcehgrcMs           "rc Cs|Pt|||j}|pt3tj|jvrt||j d}t ||d|j tj |j tj t|Wdn1sHwYWdn1sWwYt|j|jdd}|d}|j}t|D] }||qpt||S)aconvert a shared repository to a normal one Copy the store data to the repo and remove the sharedpath data. Returns a new repository object representing the unshared repository. The passed repository object is not usable after this function is called. s sharedpaths.oldNF)rzr<)r copystorer5r"nullcontextmanagerrSHARESAFE_REQUIREMENTrr$joinrenamediscardSHARED_REQUIREMENTRELATIVE_SHARED_REQUIREMENTrwritereporequirementsr%baseuirootsubstatesortedsubunsharerpoisonrepository)rrhdestlock sharefilenewrepocsubssr9r9r:rcs(      rcCsz|p|jdd}|rd}|jdt||tj|jvr;|t |WddS1s4wYdSdS)aACalled after a new shared repo is created. The new repo only has a requirements file and pointer to the source. This function configures additional shared data. Extensions can wrap this function and write additional entries to destrepo/.hg/shared to indicate additional pieces of data to be shared. pathsdefaults[paths] default = %s rN) rconfigr$rr" tonativeeolrNARROW_REQUIREMENTwlockrcopytoworkingcopy) sourcerepodestrepordefaulttemplater9r9r:rs    "rc Csp|sdS|jtd|dur|}|ddfD]}|durqz||}Wn tjy0Yqwt||dS)zMaybe perform a working directory update after a shared repo is created. ``update`` can be a boolean or a revision to update to. Nsupdating working directory Trtip)rstatusrlookuprrQ_update)rhrrtestuprevr9r9r:rs rcCsZd}zd}|r tdntd}|j|tdd}d}|}t|j} t|} |jD]G} |r9| dr9q/t j | } | rK| | sK| | | | rv| drbt j | d } t| | }t| | | | ||\}}||7}q/|r|d |n|d |Wd|WSWd|WS1swY|WSt|) zGcopy files from store of srcrepo in destpath returns destlock Nslinkingscopyingsfiles)unitr phaserootssdataslockslinked %d files scopied %d files )r makeprogress publishingrr$rstorecopylistendswithr,r5dirnamermkdirrrr" copyfilesdebugrelease)rrdestpathrhardlinktopicprogressnum srcpublishingrrr}dstbaselockfilenr9r9r:rsJ         rc  Csd} |r:|dsttdg} |D]#} |} | | dd| iWdn1s2wYq| } tj |}zt |dWnt ya} z | jtjkrWWYd} ~ nd} ~ wwt|}tj |}t|d|-tj |r|td|n|td|t||||d |d| d Wdn1swYt|rt t|}n|}t||d }t|||dd|d }tj||| d t|||t |||fS)aPerform a clone using a shared repo. The store for the repository will be located at /.hg. The specified revisions will be cloned or pulled from "source". A shared repo will be created at "dest" and a working copy will be created if "update" is True. NlookupXsrc repository does not support revision lookup and so doesn't support clone by revisionkeyFs%s.locks-(sharing from existing pooled repository %s) s((sharing from new pooled repository %s) T)rpullrHrstream)r5)rrr r)heads)!rLrr2rrNrMrOrPr,r5rr"makedirr4errnoEEXISTrr$rrrrclonerdabspathr(r+r%rrrrrJ)rpeeropts sharepathrsrcpeerrrrrrrH remoterevsr?r8pooldirpoolvfsrr sharereporr9r9r:clonewithshares             rcCsP|j|}tj||}tj|r&tj|st|t||dSdS)z8copy a cache from srcrepo to destcachedir (if it exists)N)cachevfsrr,r5rrr"copyfile)r dstcachedirfnamesrcfnamedstfnamer9r9r: _copycachePs    rc 2 Csd t|trt|||} | \}}}t|||}n|}d|p gf}|}}d}}}}d}zt||||\}}|durQt|}|rP|t d|nt||d}t |}t |}|slt t dt j|dd}|r|st t d||rt t d|i}d }| durt| d}| durt| d}|r| r| sd h} d|d <| rd|d <|d rd|d<tdr|t dn|t d| pi} | d}| d}|rt|rd}|dkrCz8|}|dddi}Wdn 1swY|tjkr(tj |t!|}n|t dWn/t j"yB|t dYnw|dkrWtj |t!t#$|%}n t &t d||rl|t dd}|rt'||||||||||d Wt(||||durt)*|d|dur|+|r|,dur|+SSS|,}|} t|rt-.t |} t|rtj/|rtj0tj |d}!|!}n|}d }"|r|1rt|rt23|s| o| }"|rd }"|"rz|j4d d}Wn t j5yd }"Ynw|"rr|j6ddd d!t |}#t78|||}$t7j9||#|$d"t7:||#}%|%;}|%4}d#d$l||%t|||}t?@||,_At?@||,_B|%jC|,_C|j6d%d |jDjEd&nzt|px|||d|d'}Wn tFy}'z|'jGtGjHkrd}t &t d|d}'~'ww|r|dst &t d(g}(|D]%})|}|(I|dd|)iWdn 1swYq|(}|d}nd}|,}*|*ri|r#|*;(|*4|*J| | tK|*Wdn 1swYWdn 1swYt| }+t|+},|*jLMd)d*|,d |s@|r>d }nd}d+di}-|*jLN|-d tOjP|*|||| | | d,Wdn 1scwYn!|r|rvt &t d-tOjQ||||jRSd.nt &t d/d}|,}%|%rtTjUd0}.t| }+d|+_Vt|+},|%jWd1t-X|.|,|%jLMd)d*|,d |Yd2d3rtZ[|%||r|dur|}|dd|i}Wdn 1swYd}/d}0|dur-t\|d4kr||%vr|}/n(t]^|%|rt]_|%|`}/n|dur-z|%a|}/Wn t j"y,Ynw|/durz1|%jbrA|%a|%jb}/|%jb}n|%jRd5}/d5}|%|/c}1|1d*krZt d6|}0nt d7||1f}0Wn"tdyz|%ed*}/Wnt j"y|%ad8}/YnwYnw|0s|%|/c}1t d9|1}0|%jL|0tf|%|/||%jRvrtgh|%||durt(||durt(||%4|%jitjjkd:Wdn 1swYWt(||||durt)*|d|dur|+|r|,dur|+||fSt(||||durt)*|d|dur!|+|r0|,dur1|+www);aMake a copy of an existing repository. Create a copy of an existing repository in a new directory. The source and destination are URLs, as passed to the repository function. Returns a pair of repository peers, the source and newly created destination. The location of the source is added to the new repository's .hg/hgrc file, as the default to be used for future pulls and pushes. If an exception is raised, the partly cloned/updated destination repository will be deleted. Arguments: source: repository object or URL dest: URL of destination repository to create (defaults to base name of source repository) pull: always pull from source repository, even in local case or if the server prefers streaming stream: stream raw data uncompressed from repository (fast over LAN, slow over WAN) revs: revision to clone up to (implies pull=True) update: update working directory after clone completes, if destination is local repository (True means update to default rev, anything else is treated as a revision) branch: branches to clone shareopts: dict of options to control auto sharing behavior. The "pool" key activates auto sharing mode and defines the directory for stores. The "mode" key determines how to construct the directory name of the shared repository. "identity" means the name is derived from the node of the first changeset in the repository. "remote" means the name is derived from the remote's path/URL. Defaults to "identity." storeincludepats and storeexcludepats: sets of file patterns to include and exclude in the repository copy, respectively. If not defined, all files will be included (a "full" clone). Otherwise a "narrow" clone containing only the requested files will be performed. If ``storeincludepats`` is not defined but ``storeexcludepats`` is, ``storeincludepats`` is assumed to be ``path:.``. If both are empty sets, no files will be cloned. Nsdestination directory: %s rs#empty destination path is not validT)r*sdestination '%s' already existssdestination '%s' is not emptyFspath:.s narrowfilessshallowfilestores lfs-serveslfsse(remote is using large file support (lfs), but it is explicitly disabled in the local configuration) sT(remote is using large file support (lfs); lfs will be enabled for this repository) spoolsmodesidentityrr0s7(not using pooled storage: remote appears to be empty) sA(not using pooled storage: unable to resolve identity of remote) sremotesunknown share naming mode: %ss1(pooled storage not supported for narrow clones) )rrrrs.hg)waits preoutgoingsclone)throwr)rr) streamcloneoutgoing)rnoderrrr)uisquietbookmarkmove)rstreamclonerequested includepats excludepatsdepths2narrow clone not available for remote destinations)rHr s)clone from remote to remote not supportedsclonedrs experimentals remotenames@supdating to bookmark %s s%updating to bookmark %s on branch %s rsupdating to branch %s )caches)lrbrcr(rrJr!rWrrrr+r InputErrorrr$lexistsisdirlistdirrvalidatepatternsrLr disabled_helpr]rdrNrOrPrnullidr,r5rrrQr&sha1digestr2rrshutilrmtreecloserfr"rrrealpathcancopyr hassecretr LockErrorrrclone_requirementscreaterepositorymakelocalrepositoryrr  local_copyweakrefref_lockref _wlockrefrA nodeconstantsnullhexr4rrrM setnarrowpatsrr setconfigconfigoverriderrpush _bookmarkskeysuimod samplehgrcspasswdrr configboolrpullremotenameslenr isrevsymbol revsymbolr r_activebookmarkrBKeyError branchtiprr activate updatecaches repositorymodCACHES_POST_CLONE)2rrrrrrHrrrB shareoptsstoreincludepatsstoreexcludepatsrsrcrrSrsrclockr destwlockcleandirdestpeerrdestvfsrtnarrow sharepool sharenamemoderr8rootnoderrhgdircopy destrootpath dest_reqsrr instrrrfr_ defaulturl overridesrrrbnr9r9r:rZs A                                                                        rcCs8|r|rdS|jtd|j|j|j|jfdS)NsI%d files updated, %d files merged, %d files removed, %d files unresolved )isemptyrrr updatedcount mergedcount removedcountunresolvedcount)rhr quietemptyr9r9r: _showstats/s r_cCs(|jddtj||d|ddg|dS)zUpdate the working directory to node. When overwrite is set, changes are clobbered, merged else returns stats (see pydoc mercurial.merge.applyupdates)sBprefer merge.update() or merge.clean_update() over hg.updaterepo()s5.7Fs working copys destination) branchmergeforcelabels updatecheck)r deprecwarnmergemodr)rhr  overwritercr9r9r: updaterepo@srgcCs>tj|||d}t||||jr|jtd|jdkS)z$update the working directory to nodercs1use 'hg resolve' to retry unresolved file merges r)rerr_r]rrr)rhr r^rcrr9r9r:rTs   rcCs0t||}|jdksJ|rt|||dS)zAforcibly switch the working directory to node, clobbering changesrF)re clean_updater]r_)rhr  show_statsr^rr9r9r:cleanas  rkc Cs|dur|dd}|tvrtj}|tvrtd|tf|d}d}|dur8tj||d}|\}}}d}|r@t||} n|tj krOt j |ddtj }t |||d } | s|r||d krcnmt||g|d r||jd } |td | nP||jd } |td| t|n:||jvr||jkr||d } |td| t||n|r|jr||jd } |td| t||rt||Wd| SWd| S1swY| S)aUpdate the working directory with extra care for non-file components This takes care of non-file components below: :bookmark: might be advanced or (in)activated This takes arguments below: :checkout: to which revision the working directory is updated :brev: a name, which might be a bookmark to be activated after updating :clean: whether changes in the working directory can be discarded :updatecheck: how to deal with a dirty working directory Valid values for updatecheck are the UPDATECHECK_* constants defined in the merge module. Passing `None` will result in using the configured default. * ABORT: abort if the working directory is dirty * NONE: don't check (merge working directory changes into destination) * LINEAR: check that update is linear before merging working directory changes into destination * NO_CONFLICT: check that the update does not result in file merges This returns whether conflict is detected at updating or not. Nscommandss update.checkz,Invalid updatecheck value %r (can accept %r)F)rkT)rrhr<sbookmarks.activesupdating bookmark %s r)s(leaving bookmark %s) s(activating bookmark %s) )r_VALID_UPDATECHECKSreUPDATECHECK_LINEARr1rr destupdate_cleanUPDATECHECK_ABORTr bailifchangedUPDATECHECK_NONErr r rlabelr=rr deactivater3r@statusotherdests) rrhrbrevrkrc movemarkfromwarndestupdataretbr9r9r: updatetotallyusf           ) ))r|cCsX|}tj|||d}t|||jr|jtdn |r'|jtd|jdkS)zWBranch merge with node, resolving changes. Return true if any unresolved conflicts.)rarbsRuse 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon s'(branch merge, don't forget to commit) r)rhrerr_r]rrr)ctxraremindrbrhrr9r9r:rs  rcCsrtj|}|r|j}n|d}|jtd|ddt ||}|j dks2Jt ||dS)Nr<s(aborting the merge, updating back to %s r) mergestatemodrractivelocalctxrrrrrerir]r_)rrhmsr rr9r9r: abortmerges   rc st|||g}t|}t|dkr!td} | t|;} t| |d} t| j| d\}} |durbt |}| rCt |}nt |} | rQtjj} ntj} | d| j|f| _t | }t|||j}zc|tdt|t|| | d\}}|rfd d |D}t|||| d | d \}}|s|td |W|S|dtj|||d}||||W|n|w|dS)z Helper for incoming / gincoming. displaychlist gets called with (remoterepo, incomingchangesetlist, displayer) parameters, and is supposed to contain only code that can't be unified. rs<for now, incoming supports only a single source, %d providedrbranchN%s/%scomparing with %s revcsg|]}|qSr9)rr>rrRr9r: sz_incoming..rXforcesno changes found sincomingbuffered)r(get_pull_pathsrKr:rrr2rrawlocr]r!isabsrcrdr,r5r posixpathrJrr hidepasswordrWr getremotechangespagerrchangesetdisplayer) displaychlistsubreporecurserrhrrrsubpathsrcsmsgr5rSpr cleanupfnrHrchlist displayerr9rr: _incomingsR            rc s6fdd}fdd}t|||dS)NcsHd}dr"d}t|jD]}||}t||}q|SNrssubrepos)r]rrrminincoming)rzr}rrrrhrrr9r:r+  z incoming..subreporecursecst}dr|d}|D]1}|dur||krdSfdd|j|D}dr8t|dkr8q|d7}|||qdS)N newest_firstrcg|] }|jkr|qSr9rr>rrgr9r:r<sz-incoming..display.. no_mergesr)rgetlimitr]reverse changelogparentsr:show)rRrrlimitcountrr)rrhr9r:display4s    zincoming..displayr)r)rrhrrrrrr9rr:r*s  rcszt}g}t||D]}|jp|j}|durEt|}|r&t|}nt|} | r4t j j } nt j } | d| j |f| _ t| }|j |dpMgf} |tdt|t| |d\} } | rvfddt| D} t||}z&tj|| |dd}|j}|||stj|j||Wq |t |}j!}|j"|j#d ||fS) Nrrrrcsg|]}|qSr9)r rrgr9r:r_sz_outgoing..r)ra)key)$rr(get_push_pathspushloclocr!rrcrdr,r5rrrBr]rrrrWrrevrangerJr findcommonoutgoingmissingrrnochangesfoundrexcludedrMrrKrsortr)rrhdestsrroutothersr5rrrrSrHrrRoutgoingo outgoing_revsclr9rgr: _outgoingIsH       rcCsHd}|dr"|d}t|jD]}||}t|||||}q|Sr)r]rrrrr)rrhrrrzr}rrr9r9r:_outgoing_recurseurrc #st|}|d}|dr||dur$|s$|D]}|VqdSd}j}|D])}|dur8||kr8dSfdd||D} |rMt| dkrMq+|d7}|Vq+dS) z5apply revision filtering/ordering option for outgoingrrNrcrr9rrrgr9r:rsz$_outgoing_filter..rr)rrr]rrrr:) rhrHrr no_mergesr?rrrrr9rgr:_outgoing_filters(    rc Cs |dr tg|t|||||d\}}d}zm|rbd}|drBt|||}|dtj|||dd} t|||| tj n |dt|||} t |||D] } | || qT| |D]} t ||| ||t|t||||}qd|W|D]} | q~S|D]} | qw)Nsgraphrrrr Tr)r]rcheckunsupportedgraphflagsr graphrevsrr displaygraphr asciiedgesrrrr outgoinghooksrr) rrhrrrrrrzrevdagrrothr9r9r:rs<        rc Cstj||d}|dt|j|d}|rq|jt d|D]O}||}z2|j D],}z |j |ddp8|}Wq+t j yW}z|jd||fWYd}~q+d}~wwWq!typ|jt d t|Yq!w|S) z&verify the consistency of a repository)levels filelog(%s)s .hgsubstateschecking subrepo links F) allowcreates%d: %s Ns&.hgsubstate is corrupt in revision %s ) verifymodr#rHr"pathtorgetcwdrrrrrr RepoErrorwarn Exceptionrr )rhrrzrHrr}rr8r9r9r:r#s4    r#c Cst|dr|j}|j}n|}dD]}||p!|d|}|r,|d||dq|dd}|r=|dd|ddD]}||D] \}}||||dqFq?|dd }|rg|dd t |d|S) z*build a remote ui from ui or repo and optssbaseui)rZs remotecmdr scopiedrXs mainreporoot)sauthshostfingerprintss hostsecuritys http_proxyswebscacerts) r"r^rrRrr]rr0 configitemsr*) rGrdstrvr?sectrvalr9r9r:rs(    r))spaths 00changelog.i)rr)rsobsstore)spathr)c@s0eZdZdZddZddZddZdd Zd S) cachedlocalrepoz6Holds a localrepository that can be cached and reused.cCs2t|tjsJ||_|\|_|_|j|_dS)zCreate a new cached repo from an existing repo. We assume the passed in repo was recently created. If the repo has changed between when it was created and when it was turned into a cache, it may not refresh properly. N) rbrlocalrepository_repo _repostate_statemtime filtername _filtername)selfrhr9r9r:__init__s zcachedlocalrepo.__init__cCsj|\}}||jkr|jdfSt|jj|j}|jr%||j|_n||_||_||_ |jdfS)aRefresh (if necessary) and return a repository. If the cached instance is out of date, it will be recreated automatically and returned. Returns a tuple of the repo and a boolean indicating whether a new repo instance was created. FT) rrrr%rr!rr unfilteredr)rstaterrhr9r9r:fetchs     zcachedlocalrepo.fetchc Csg}d}tD]:\}}t|j|}tj||}zt|}Wnty,t|}Ynw||tj |j ft ||tj }qt ||fS)N) foirrr,r5rr-r4rMST_MTIMEst_sizemaxtuple)rrmaxmtimeattrrprefixrr6r9r9r:r-s    zcachedlocalrepo._repostatecCsJt|jj|jj}|jr||j}n|}t|}|j|_|j |_ |S)zObtain a copy of this class instance. A new localrepository instance is obtained. The new instance should be completely independent of the original. ) r%rrorigrootrrrrrr)rrhrr9r9r:rR<szcachedlocalrepo.copyN)__name__ __module__ __qualname____doc__rrrrRr9r9r9r:rs   r)T)FNNN)rFNNN)FNN)NTTNFr=)FNTF) NFNTFNNNNN)F)FN)TF)FTN)f __future__rrr,rrr-r)i18nrr rrrpycompatrr'r r r r r rrrrrrrrrrrerrrrrrrrrr5r r!r"r#rr$r interfacesr%rButilsr&r'r(rrr;rWr\rardrpryrrJrrrrrrrrrrrr_rgrrrkrorprrrmUPDATECHECK_NO_CONFLICTrlr|rrrrrrrrrobjectrr9r9r9r:s   x -      0 0 / m  X     R  ? ,  !"!