示例#1
0
from django.conf.urls import include, patterns, url

from reviewboard.reviews.views import ReviewsDiffFragmentView, ReviewsDiffViewerView, ReviewRequestSearchView


download_diff_urls = patterns(
    "reviewboard.reviews.views",
    url(r"^orig/$", "download_orig_file", name="download-orig-file"),
    url(r"^new/$", "download_modified_file", name="download-modified-file"),
)

diffviewer_revision_urls = patterns(
    "reviewboard.reviews.views",
    url(r"^$", ReviewsDiffViewerView.as_view(), name="view-diff-revision"),
    url(r"^raw/$", "raw_diff", name="raw-diff-revision"),
    url(r"^fragment/(?P<filediff_id>[0-9]+)/$", ReviewsDiffFragmentView.as_view()),
    url(r"^fragment/(?P<filediff_id>[0-9]+)/chunk/(?P<chunkindex>[0-9]+)/$", ReviewsDiffFragmentView.as_view()),
    url(r"^download/(?P<filediff_id>[0-9]+)/", include(download_diff_urls)),
)

diffviewer_interdiff_urls = patterns(
    "reviewboard.reviews.views",
    url(r"^$", ReviewsDiffViewerView.as_view(), name="view-interdiff"),
    url(r"^fragment/(?P<filediff_id>[0-9]+)/$", ReviewsDiffFragmentView.as_view()),
    url(r"^fragment/(?P<filediff_id>[0-9]+)/chunk/(?P<chunkindex>[0-9]+)/$", ReviewsDiffFragmentView.as_view()),
)

diffviewer_urls = patterns(
    "reviewboard.reviews.views",
    url(r"^$", ReviewsDiffViewerView.as_view(), name="view-diff"),
    url(r"^raw/$", "raw_diff", name="raw-diff"),
示例#2
0
    # Review request diffs
    url(r'^(?P<review_request_id>[0-9]+)/diff/$',
        ReviewsDiffViewerView.as_view(),
        name="view_diff"),
    url(r'^(?P<review_request_id>[0-9]+)/diff/(?P<revision>[0-9]+)/$',
        ReviewsDiffViewerView.as_view(),
        name="view_diff_revision"),

    url(r'^(?P<review_request_id>[0-9]+)/diff/raw/$', 'raw_diff',
        name='raw_diff'),
    (r'^(?P<review_request_id>[0-9]+)/diff/(?P<revision>[0-9]+)/raw/$',
     'raw_diff'),

    (r'^(?P<review_request_id>[0-9]+)/diff/(?P<revision>[0-9]+)/fragment/(?P<filediff_id>[0-9]+)/$',
     ReviewsDiffFragmentView.as_view()),
    (r'^(?P<review_request_id>[0-9]+)/diff/(?P<revision>[0-9]+)/fragment/(?P<filediff_id>[0-9]+)/chunk/(?P<chunkindex>[0-9]+)/$',
     ReviewsDiffFragmentView.as_view()),

    # Fragments
    (r'^(?P<review_request_id>[0-9]+)/fragments/diff-comments/(?P<comment_ids>[0-9,]+)/$',
     'comment_diff_fragments'),

    # Review request interdiffs
    url(r'^(?P<review_request_id>[0-9]+)/diff/(?P<revision>[0-9]+)-(?P<interdiff_revision>[0-9]+)/$',
        ReviewsDiffViewerView.as_view(),
        name="view_interdiff"),
    (r'^(?P<review_request_id>[0-9]+)/diff/(?P<revision>[0-9]+)-(?P<interdiff_revision>[0-9]+)/fragment/(?P<filediff_id>[0-9]+)/$',
     ReviewsDiffFragmentView.as_view()),
    (r'^(?P<review_request_id>[0-9]+)/diff/(?P<revision>[0-9]+)-(?P<interdiff_revision>[0-9]+)/fragment/(?P<filediff_id>[0-9]+)/chunk/(?P<chunkindex>[0-9]+)/$',
     ReviewsDiffFragmentView.as_view()),
示例#3
0
from reviewboard.reviews.views import (ReviewsDiffFragmentView,
                                       ReviewsDiffViewerView,
                                       ReviewsDownloadPatchErrorBundleView)


download_diff_urls = patterns(
    'reviewboard.reviews.views',

    url(r'^orig/$', 'download_orig_file', name='download-orig-file'),
    url(r'^new/$', 'download_modified_file', name='download-modified-file'),
)

diff_fragment_urls = patterns(
    '',

    url('^$', ReviewsDiffFragmentView.as_view(),
        name='view-diff-fragment'),
    url('^patch-error-bundle/$',
        ReviewsDownloadPatchErrorBundleView.as_view(),
        name='patch-error-bundle'),
)

diffviewer_revision_urls = patterns(
    'reviewboard.reviews.views',

    url(r'^$',
        ReviewsDiffViewerView.as_view(),
        name="view-diff-revision"),

    url(r'^raw/$',
        'raw_diff',