<commit_before>from django.conf import settings
from django.conf.urls.defaults import *
from reviewboard.reviews.models import ReviewRequest, Group
from reviewboard.reviews.feeds import RssReviewsFeed, AtomReviewsFeed
from reviewboard.reviews.feeds import RssSubmitterReviewsFeed
from reviewboard.reviews.feeds import AtomSubmitterReviewsFeed
from reviewboard.reviews.feeds import RssGroupReviewsFeed
from reviewboard.reviews.feeds import AtomGroupReviewsFeed
import os.path

rss_feeds = {
    'r': RssReviewsFeed,
    'users': RssSubmitterReviewsFeed,
    'groups': RssGroupReviewsFeed,
}

atom_feeds = {
    'r': AtomReviewsFeed,
    'users': AtomSubmitterReviewsFeed,
    'groups': AtomGroupReviewsFeed,
}

urlpatterns = patterns('',
    (r'^admin/', include('django.contrib.admin.urls')),
    (r'^api/json/', include('reviewboard.reviews.urls.json')),

    (r'^$', 'django.views.generic.simple.redirect_to',
     {'url': '/dashboard/'}),

    # Review request browsing
    (r'^dashboard/$', 'reviewboard.reviews.views.dashboard',
     {'template_name': 'reviews/dashboard.html'}),

    (r'^r/$', 'reviewboard.reviews.views.review_list',
     {'queryset': ReviewRequest.objects.filter(public=True, status='P'),
      'template_name': 'reviews/review_list.html'}),

    # Review request creation
    (r'^r/new/changenum/$',
      'reviewboard.reviews.views.new_from_changenum'),
    (r'^r/new/$', 'reviewboard.reviews.views.new_review_request'),

    # Review request detail
    (r'^r/(?P<object_id>[0-9]+)/$',
     'reviewboard.reviews.views.review_detail',
     {'template_name': 'reviews/review_detail.html'}),

    # Review request diffs
    (r'^r/(?P<object_id>[0-9]+)/diff/$',
     'reviewboard.reviews.views.diff'),
    (r'^r/(?P<object_id>[0-9]+)/diff/(?P<revision>[0-9]+)/$',
     'reviewboard.reviews.views.diff'),

    (r'^r/(?P<object_id>[0-9]+)/diff/(?P<revision>[0-9]+)/fragment/(?P<filediff_id>[0-9]+)/$',
     'reviewboard.reviews.views.diff_fragment'),

    # Review request modification
    (r'^r/(?P<object_id>[0-9]+)/edit/$',
      'django.views.generic.create_update.update_object',
     {'model': ReviewRequest,
      'template_name': 'reviews/edit_details.html'}),

    (r'^r/[0-9]+/diff/upload/$',
     'reviewboard.diffviewer.views.upload',
      {'donepath': 'done/%s/'}),

    (r'^r/(?P<review_request_id>[0-9]+)/diff/upload/done/(?P<diffset_id>[0-9]+)/$',
     'reviewboard.reviews.views.upload_diff_done'),

    (r'^r/(?P<review_request_id>[0-9]+)/publish/$',
     'reviewboard.reviews.views.publish'),

    (r'^r/(?P<review_request_id>[0-9]+)/(?P<action>(discard|submitted|reopen))/$',
     'reviewboard.reviews.views.setstatus'),

    # E-mail previews
    (r'^r/(?P<review_request_id>[0-9]+)/preview-email/$',
     'reviewboard.reviews.views.preview_review_request_email'),
    (r'^r/(?P<review_request_id>[0-9]+)/replies/preview-email/(?P<review_id>[0-9]+)/$',
     'reviewboard.reviews.views.preview_reply_email'),

    # Comments
    (r'^r/(?P<review_request_id>[0-9]+)/diff/comments/(?P<filediff_id>[0-9]+)/(?P<line>[0-9]+)/$',
     'reviewboard.reviews.views.comments'),
    (r'^r/(?P<review_request_id>[0-9]+)/diff/(?P<revision>[0-9]+)/comments/(?P<filediff_id>[0-9]+)/(?P<line>[0-9]+)/$',<commit_msg>Remove a URL handler for something that never existed.<commit_after>from django.conf import settings
from django.conf.urls.defaults import *
from reviewboard.reviews.models import ReviewRequest, Group
from reviewboard.reviews.feeds import RssReviewsFeed, AtomReviewsFeed
from reviewboard.reviews.feeds import RssSubmitterReviewsFeed
from reviewboard.reviews.feeds import AtomSubmitterReviewsFeed
from reviewboard.reviews.feeds import RssGroupReviewsFeed
from reviewboard.reviews.feeds import AtomGroupReviewsFeed
import os.path

rss_feeds = {
    'r': RssReviewsFeed,
    'users': RssSubmitterReviewsFeed,
    'groups': RssGroupReviewsFeed,
}

atom_feeds = {
    'r': AtomReviewsFeed,
    'users': AtomSubmitterReviewsFeed,
    'groups': AtomGroupReviewsFeed,
}

urlpatterns = patterns('',
    (r'^admin/', include('django.contrib.admin.urls')),
    (r'^api/json/', include('reviewboard.reviews.urls.json')),

    (r'^$', 'django.views.generic.simple.redirect_to',
     {'url': '/dashboard/'}),

    # Review request browsing
    (r'^dashboard/$', 'reviewboard.reviews.views.dashboard',
     {'template_name': 'reviews/dashboard.html'}),

    (r'^r/$', 'reviewboard.reviews.views.review_list',
     {'queryset': ReviewRequest.objects.filter(public=True, status='P'),
      'template_name': 'reviews/review_list.html'}),

    # Review request creation
    (r'^r/new/changenum/$',
      'reviewboard.reviews.views.new_from_changenum'),
    (r'^r/new/$', 'reviewboard.reviews.views.new_review_request'),

    # Review request detail
    (r'^r/(?P<object_id>[0-9]+)/$',
     'reviewboard.reviews.views.review_detail',
     {'template_name': 'reviews/review_detail.html'}),

    # Review request diffs
    (r'^r/(?P<object_id>[0-9]+)/diff/$',
     'reviewboard.reviews.views.diff'),
    (r'^r/(?P<object_id>[0-9]+)/diff/(?P<revision>[0-9]+)/$',
     'reviewboard.reviews.views.diff'),

    (r'^r/(?P<object_id>[0-9]+)/diff/(?P<revision>[0-9]+)/fragment/(?P<filediff_id>[0-9]+)/$',
     'reviewboard.reviews.views.diff_fragment'),

    # Review request modification
    (r'^r/[0-9]+/diff/upload/$',
     'reviewboard.diffviewer.views.upload',
      {'donepath': 'done/%s/'}),

    (r'^r/(?P<review_request_id>[0-9]+)/diff/upload/done/(?P<diffset_id>[0-9]+)/$',
     'reviewboard.reviews.views.upload_diff_done'),

    (r'^r/(?P<review_request_id>[0-9]+)/publish/$',
     'reviewboard.reviews.views.publish'),

    (r'^r/(?P<review_request_id>[0-9]+)/(?P<action>(discard|submitted|reopen))/$',
     'reviewboard.reviews.views.setstatus'),

    # E-mail previews
    (r'^r/(?P<review_request_id>[0-9]+)/preview-email/$',
     'reviewboard.reviews.views.preview_review_request_email'),
    (r'^r/(?P<review_request_id>[0-9]+)/replies/preview-email/(?P<review_id>[0-9]+)/$',
     'reviewboard.reviews.views.preview_reply_email'),

    # Comments
    (r'^r/(?P<review_request_id>[0-9]+)/diff/comments/(?P<filediff_id>[0-9]+)/(?P<line>[0-9]+)/$',
     'reviewboard.reviews.views.comments'),
    (r'^r/(?P<review_request_id>[0-9]+)/diff/(?P<revision>[0-9]+)/comments/(?P<filediff_id>[0-9]+)/(?P<line>[0-9]+)/$',
{'fraction_non_alphanumeric': 0.20807698375138034, 'fraction_numerical': 0.01419782300047326, 'mean_word_length': 4.610619469026549, 'pattern_counts': {'":': 0, '<': 48, '<?xml version=': 0, '>': 48, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1899152', 'n_tokens_mistral': 2443, 'n_tokens_neox': 2338, 'n_words': 251}