o ]Lb @sdZddlmZddlmZddlmZddlmZm Z m Z m Z m Z m Z mZddlmZmZe jZiZeeZdZedd d ged ed fd ddedfd ddedfd ddedfgejejejedejddddZdS)z2pull, update and merge in one command (DEPRECATED))absolute_import)_)short)cmdutilerrorexchangehglockpycompat registrar)dateutilurlutilsships-with-hg-corefetchrrevs*a specific revision you would like to pullsREVeditNs invoke editor on commit messagess force-editors edit commit message (DEPRECATED)s switch-parentsswitch parents when mergingshg fetch [SOURCE]) helpcategorydefaultc st|}|d}|rt||d<jj}z|}Wn t j y0d}Ynw|kr@t j t dt ddd}}z }}t|} fdd| D} t| dkrnt t d td ||d } t|| |t d t| d} |d rz fdd|d D} Wnt jyt d} t | wtj| dj} | d krWt||d S|}jg|d}t|dkrt|r|d krt |d Wt||SWt||d Sfdd|D}|r|d t!fdd|D}t|dkr7|t dt|dWt||dS|sBWt||d Sd} |r|drT|d }}n|d }}|t dj"|t#|ft!||}|t d|"t#|ftj$|dd} | st%||pdt&'}|dp|d}tj(|d d}j)||d|d|d}|t d j"|t#|f| Wt||St||w)!apull changes from a remote repository, merge new changes if needed. This finds all changes from the repository at the specified path or URL and adds them to the local repository. If the pulled changes add a new branch head, the head is automatically merged, and the result of the merge is committed. Otherwise, the working directory is updated to include the new changes. When a merge is needed, the working directory is first updated to the newly pulled changes. Local changes are then merged into the pulled changes. To switch the merge order, use --switch-parent. See :hg:`help dates` for a list of formats valid for -d/--date. Returns 0 on success. sdateNs#working directory not at branch tips'use 'hg update' to check out branch tip)hintcs$g|]}t|dkr|qS)r)lenchildren).0head)repo-/usr/lib/python3/dist-packages/hgext/fetch.py gs$zfetch..sHmultiple heads in this branch (use "hg heads ." and "hg merge" to merge)rrspulling from %s rcsg|]}|qSr)lookup)rrev)otherrrrvssOother repository doesn't support revision lookup, so a rev cannot be specified.)headscg|]}|kr|qSrrrn)parentrrrcr$rrr%) newparentrrrr(s[not merging with %d other new branch heads (use "hg heads ." and "hg merge" to merge them) Fs switch_parentsupdating to %d:%s smerging with %d:%s )remindsAutomated merge with %srs force_editor)editeditformsuser)editors5new changeset %d:%s merges remote changes with local )*r byteskwargsgetr parsedatedirstatep1branch branchtiprRepoLookupErrorAbortrwlockr r bailifchanged branchheadsrr get_unique_pull_pathrpeerstatus hidepasswordCapabilityErrorrpullcgresultrelease changelog nodesbetweenupdatecleanr rmerge logmessage removeauthurlgetcommiteditorcommit)uirsourceoptsdater3 branchnoder7r bheadspathrevserrmodheadsnewheads newchildren firstparent secondparentp2ctxmessageeditoptr-r&r)r)r!r'rrfetch&s (       F   ?=  ,)  r])r)__doc__ __future__rmercurial.i18nrmercurial.noder mercurialrrrrr r r mercurial.utilsr r rAcmdtablecommand testedwith commitopts commitopts2 remoteoptsCATEGORY_REMOTE_REPO_MANAGEMENTr]rrrrs@   $