-=[ Mr. Bumblebee ]=-
_Indonesia_
ó
Ì\,Tc @ s« d Z d d l Z d d l Z d d l m Z m Z m Z m Z d d l m Z d Z
d e f d YZ d Z
i d d
6d d 6d
d 6d d 6d d 6Z d Z d S( 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
extensionst hgt templatert util( t _t internalt ShortRepositoryc B s# e Z d Z d Z d Z RS( c C sg | | _ | | _ | | _ y+ t t t t j d | j | _ Wn t k
rb d | _ n Xd S( Ns \{(\d+)\}i (
t schemeR t urlt maxt mapt intt ret findallt partst
ValueError( t selfR R R ( ( s1 /usr/lib/python2.7/dist-packages/hgext/schemes.pyt __init__3 s +
c C s d | j S( Ns <ShortRepository: %s>( R ( R ( ( s1 /usr/lib/python2.7/dist-packages/hgext/schemes.pyt __repr__<