# Copyright (C) 2009-2010 by Fog Creek Software. All rights reserved.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2, incorporated herein by reference.
from django.conf.urls.defaults import *
from piston.resource import Resource
from api.handlers import RepositoryHandler, FileHandler, AnnotationHandler
from api.handlers import ChangesetHandler, DiffHandler, OutgoingHandler
from api.handlers import AutopullHandler, ManifestHandler
from api.handlers import SizeHandler
annotations = Resource(AnnotationHandler)
autopull = Resource(AutopullHandler)
changesets = Resource(ChangesetHandler)
diffs = Resource(DiffHandler)
files = Resource(FileHandler)
manifest = Resource(ManifestHandler)
outgoing = Resource(OutgoingHandler)
repositories = Resource(RepositoryHandler)
size = Resource(SizeHandler)
urlpatterns = patterns('',
url(r'^$', repositories),
url(r'^file/(?P<rev>[^/]+)/(?P<path>.*)$', files),
url(r'^manifest/(?P<rev>[^/]+)$', manifest),
url(r'^annotate/(?P<rev>[^/]+)/(?P<path>.*)$', annotations),
url(r'^changeset/(?P<revs>[^/]+)(/(?P<filename>.+))?$', changesets),
url(r'^changeset/$', changesets),
url(r'^diff/(?P<revs>[^/]+)(/(?P<filename>.+))?$', diffs),
url(r'^outgoing/(?P<uuid2>[0-9A-Fa-f\-]+)', outgoing),
url(r'^autopull/(?P<uuid2>[0-9A-Fa-f\-]+)', autopull),
url(r'^size/$', size),
)
|
Loading...