-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/hgext/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/hgext/factotum.pyc

ó
Ì\,Tc@s¥dZddlmZddlmZddlmZmZddlZddl	Z	dZ
daa
ad„Zd„Zd	„Zeeƒd
„ƒZd„ZdS(sâhttp authentication with factotum

This extension allows the factotum(4) facility on Plan 9 from Bell Labs
platforms to provide authentication information for HTTP access. Configuration
entries specified in the auth section as well as authentication information
provided in the repository URL are fully supported. If no prefix is specified,
a value of "*" will be assumed.

By default, keys are specified as::

  proto=pass service=hg prefix=<prefix> user=<username> !password=<password>

If the factotum extension is unable to read the required key, one will be
requested interactively.

A configuration section is available to customize runtime behavior. By
default, these entries are::

  [factotum]
  executable = /bin/auth/factotum
  mountpoint = /mnt/factotum
  service = hg

The executable entry defines the full path to the factotum binary. The
mountpoint entry defines the path to the factotum file service. Lastly, the
service entry controls the service name used when reading keys.

iÿÿÿÿ(t_(tpasswordmgr(thttpconnectiontutilNi€cCse|jjƒs'tjtdƒƒ‚nd|kr@d|}nd|}tjdt|fƒdS(Nsfactotum not interactivesuser=s%s user?s
%s !password?s
%s -g '%s'(tuitinteractiveRtAbortRtostsystemt_executable(tselftparams((s2/usr/lib/python2.7/dist-packages/hgext/factotum.pytauth_getkey9s

cCsd|}x÷trtjdttjƒ}z¶yƒtj|d|ƒtj|tƒjƒ}|ddkr±tj|dƒtj|tƒjƒ}|ddkr±|dSnWn,t	t
fk
ràtjt
dƒƒ‚nXWdtj|ƒX|||ƒq
WdS(	Ns
proto=pass %ss%s/rpcsstart %sitoktreadisfactotum not responding(tTrueRtopent_mountpointtO_RDWRtwriteRtERRMAXtsplittOSErrortIOErrorRRRtclose(R
tgetkeyRtfdtl((s2/usr/lib/python2.7/dist-packages/hgext/factotum.pytauth_getuserpasswdAs 
	cs‡fd†}|S(Ncstˆ|j|ƒ|S(N(tsetattrt__name__(tfunc(tcls(s2/usr/lib/python2.7/dist-packages/hgext/factotum.pyt	decoratorUs((R R!((R s2/usr/lib/python2.7/dist-packages/hgext/factotum.pytmonkeypatch_methodTsc
CsItjj|||ƒ\}}|rD|rD|j||ƒ||fSd}tj|j||ƒ}|r¥|\}}|jdƒ}|jdƒ|jdƒ}}n|s³|r|sÕ|jdƒdj	ƒ}ndt
|f}	|rþd|	|f}	nt|t|	ƒ\}}n|j
||||ƒ|j||ƒ||fS(	Nttprefixtusernametpasswordt isservice=%s prefix=%ss
%s user=%s(turllib2tHTTPPasswordMgrWithDefaultRealmtfind_user_passwordt_writedebugRtreadauthforuriRtgetRtlowert_serviceRRtadd_password(
R
trealmtauthuritusertpasswdR$tresRtauthR((s2/usr/lib/python2.7/dist-packages/hgext/factotum.pyR*Zs*	
"cCsC|jdddƒa|jdddƒa|jdddƒadS(Ntfactotumt
executables/bin/auth/factotumt
mountpoints
/mnt/factotumtservicethg(tconfigR	RR/(R((s2/usr/lib/python2.7/dist-packages/hgext/factotum.pytuisetupts(t__doc__tmercurial.i18nRt
mercurial.urlRt	mercurialRRRR(RtNoneR	RR/RRR"R*R=(((s2/usr/lib/python2.7/dist-packages/hgext/factotum.pyt<module>.s			

Copyright © 2017 || Recoded By Mr.Bumblebee