Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 ÝPf� ã@s„ddlmZddlZddlZddlZddlmZmZddlm Z m Z ddl m Z ddl mZejeƒZGdd„de ƒZe jeƒdS) é)Úabsolute_importN)Ú display_pathÚrmtree)ÚvcsÚVersionControl)Ú path_to_url)Ú configparserc@sdeZdZdZdZdZdZdd „Zd d „Zd d „Z dd„Z dd„Z dd„Z dd„Z dd„Zdd„ZdS)Ú MercurialÚhgz.hgÚcloneúhg+httpúhg+httpsúhg+sshúhg+static-httpc Cs>tjddƒ}|j|ƒz|jd|gd|d�Wdt|ƒXdS)z?Export the Hg repository at the url to the destination locationz-exportzpip-ÚarchiveF)Ú show_stdoutÚcwdN)ÚtempfileZmkdtempÚunpackÚ run_commandr)ÚselfÚlocationZtemp_dir©rú/usr/lib/python3.6/mercurial.pyÚexports   zMercurial.exportcCs¨tjj||jdƒ}tjƒ}y<|j|ƒ|jdd|ƒt|dƒ�}|j |ƒWdQRXWn6t tj fk rŒ}zt j d||ƒWYdd}~XnX|jddg||d�dS) NZhgrcÚpathsÚdefaultÚwz/Could not switch Mercurial repository to %s: %sÚupdatez-q)r)ÚosÚpathÚjoinÚdirnamerZSafeConfigParserÚreadÚsetÚopenÚwriteÚOSErrorZNoSectionErrorÚloggerZwarningr)rÚdestÚurlÚ rev_optionsZ repo_configÚconfigZ config_fileÚexcrrrÚswitch s  zMercurial.switchcCs,|jddg|d�|jddg||d�dS)NZpullz-q)rr)r)rr)r+rrrr/szMercurial.updatecCsz|jƒ\}}|r |g}d|}ng}d}|j||||ƒrvtjd||t|ƒƒ|jddd||gƒ|jddg||d�dS) Nz (to revision %s)ÚzCloning hg %s%s to %sr z --noupdatez-qr)r)Z get_url_revZcheck_destinationr(Úinforr)rr)r*Zrevr+Z rev_displayrrrÚobtain3s   zMercurial.obtaincCs2|jddgd|d�jƒ}|j|ƒr*t|ƒ}|jƒS)NZ showconfigz paths.defaultF)rr)rÚstripZ_is_local_repositoryr)rrr*rrrÚget_urlEs  zMercurial.get_urlcCs|jddgd|d�jƒ}|S)NÚparentsz--template={rev}F)rr)rr2)rrZcurrent_revisionrrrÚ get_revisionMszMercurial.get_revisioncCs|jddgd|d�jƒ}|S)Nr4z--template={node}F)rr)rr2)rrÚcurrent_rev_hashrrrÚget_revision_hashSszMercurial.get_revision_hashcCsT|j|ƒ}|jƒjdƒs d|}|jƒjddƒd}|srrrrr s  r )Z __future__rZloggingrrZ pip.utilsrrZpip.vcsrrZ pip.downloadrZpip._vendor.six.movesrZ getLoggerr?r(r ÚregisterrrrrÚs    W