-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
Ì\,Tc@s«dZddlZddlZddlmZmZmZmZddlm	Z	dZ
defd„ƒYZd„Z
id	d
6dd6d
d6dd6dd6Zd„ZdS(s'extend schemes with shortcuts to repository swarms

This extension allows you to specify shortcuts for parent URLs with a
lot of repositories to act like a scheme, for example::

  [schemes]
  py = http://code.python.org/hg/

After that you can use it like::

  hg clone py://trunk/

Additionally there is support for some more complex schemas, for
example used by Google Code::

  [schemes]
  gcode = http://{1}.googlecode.com/hg/

The syntax is taken from Mercurial templates, and you have unlimited
number of variables, starting with ``{1}`` and continuing with
``{2}``, ``{3}`` and so on. This variables will receive parts of URL
supplied, split by ``/``. Anything not specified as ``{part}`` will be
just appended to an URL.

For convenience, the extension adds these schemes by default::

  [schemes]
  py = http://hg.python.org/
  bb = https://bitbucket.org/
  bb+ssh = ssh://hg@bitbucket.org/
  gcode = https://{1}.googlecode.com/hg/
  kiln = https://{1}.kilnhg.com/Repo/

You can override a predefined scheme by defining a new scheme with the
same name.
iÿÿÿÿN(t
extensionsthgt	templatertutil(t_tinternaltShortRepositorycBs#eZd„Zd„Zd„ZRS(cCsg||_||_||_y+ttttjd|jƒƒƒ|_Wnt	k
rbd|_nXdS(Ns	\{(\d+)\}i(
tschemeRturltmaxtmaptinttretfindalltpartst
ValueError(tselfRRR((s1/usr/lib/python2.7/dist-packages/hgext/schemes.pyt__init__3s			+
cCsd|jS(Ns<ShortRepository: %s>(R(R((s1/usr/lib/python2.7/dist-packages/hgext/schemes.pyt__repr__<scCsëy|jddƒd}Wn*tk
rFtjtdƒ|ƒ‚nX|jd|jƒ}t|ƒ|jkrˆ|d}|d }nd}td„t|ƒDƒƒ}dj	|j
j|j|ƒƒ|}t
j|ƒj|||ƒS(Ns://isno '://' in scheme url '%s't/iÿÿÿÿtcss+|]!\}}t|dƒ|fVqdS(iN(tstr(t.0titv((s1/usr/lib/python2.7/dist-packages/hgext/schemes.pys	<genexpr>Ks(tsplitt
IndexErrorRtAbortRRtlentdictt	enumeratetjoinRtprocessRRt_peerlookuptinstance(RtuiRtcreateRttailtcontext((s1/usr/lib/python2.7/dist-packages/hgext/schemes.pyR"?s


%(t__name__t
__module__RRR"(((s1/usr/lib/python2.7/dist-packages/hgext/schemes.pyR2s			cCs;|r1x(tD]}|j|dƒr
tSq
Wn||ƒS(Nt:(tschemest
startswithtFalse(torigtpathR((s1/usr/lib/python2.7/dist-packages/hgext/schemes.pythasdriveletterOs

shttp://hg.python.org/tpyshttps://bitbucket.org/tbbsssh://hg@bitbucket.org/sbb+sshshttps://{1}.googlecode.com/hg/tgcodeshttps://{1}.kilnhg.com/Repo/tkilncCsætjt|jdƒƒƒtjd„ƒ}xžtjƒD]\}}tjdkr²t	|ƒdkr²|j
ƒr²tjjd|ƒr²t
jtdƒ||jƒfƒ‚nt|||ƒtj|<q;Wtjt
dtƒdS(NR*cSs|S(N((tx((s1/usr/lib/python2.7/dist-packages/hgext/schemes.pyt<lambda>`stntis%s:\s5custom scheme %s:// conflicts with drive letter %s:\
R/(R*tupdateRtconfigitemsRtenginetitemstostnameRtisalphaR.texistsRRRtupperRRRtwrapfunctionR/(R#ttRR((s1/usr/lib/python2.7/dist-packages/hgext/schemes.pytextsetup^s-(t__doc__R;Rt	mercurialRRRRtmercurial.i18nRt
testedwithtobjectRR/R*RB(((s1/usr/lib/python2.7/dist-packages/hgext/schemes.pyt<module>)s"	


Copyright © 2017 || Recoded By Mr.Bumblebee