<commit_before>from django import forms
from django.utils.translation import ugettext_lazy as _

from reviewboard.hostingsvcs.forms import HostingServiceForm
from reviewboard.hostingsvcs.service import HostingService


class GitoriousForm(HostingServiceForm):
    gitorious_project_name = forms.CharField(
        label=_('Project name'),
        max_length=64,
        required=True,
        widget=forms.TextInput(attrs={'size': '60'}))

    gitorious_repo_name = forms.CharField(
        label=_('Repository name'),
        max_length=64,
        required=True,
        widget=forms.TextInput(attrs={'size': '60'}))


class Gitorious(HostingService):
    name = 'Gitorious'
    form = GitoriousForm
    supported_scmtools = ['Git']
    supports_repositories = True
    repository_fields = {
        'Git': {
            'path': 'git://gitorious.org/%(gitorious_project_name)s/'
                    '%(gitorious_repo_name)s.git',
            'mirror_path': 'http://git.gitorious.org/'
                           '%(gitorious_project_name)s/'
                           '%(gitorious_repo_name)s.git',
            'raw_file_url': 'http://git.gitorious.org/'
                            '%(gitorious_project_name)s/'
                            '%(gitorious_repo_name)s/blobs/raw/<revision>'
        },
    }<commit_msg>Fix the raw paths for Gitorious<commit_after>from django import forms
from django.utils.translation import ugettext_lazy as _

from reviewboard.hostingsvcs.forms import HostingServiceForm
from reviewboard.hostingsvcs.service import HostingService


class GitoriousForm(HostingServiceForm):
    gitorious_project_name = forms.CharField(
        label=_('Project name'),
        max_length=64,
        required=True,
        widget=forms.TextInput(attrs={'size': '60'}))

    gitorious_repo_name = forms.CharField(
        label=_('Repository name'),
        max_length=64,
        required=True,
        widget=forms.TextInput(attrs={'size': '60'}))


class Gitorious(HostingService):
    name = 'Gitorious'
    form = GitoriousForm
    supported_scmtools = ['Git']
    supports_repositories = True
    repository_fields = {
        'Git': {
            'path': 'git://gitorious.org/%(gitorious_project_name)s/'
                    '%(gitorious_repo_name)s.git',
            'mirror_path': 'https://gitorious.org/'
                           '%(gitorious_project_name)s/'
                           '%(gitorious_repo_name)s.git',
            'raw_file_url': 'https://gitorious.org/'
                            '%(gitorious_project_name)s/'
                            '%(gitorious_repo_name)s/blobs/raw/<revision>'
        },
    }
{'fraction_non_alphanumeric': 0.11849056603773585, 'fraction_numerical': 0.0060377358490566035, 'mean_word_length': 2.4250645994832043, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '7469908', 'n_tokens_mistral': 822, 'n_tokens_neox': 808, 'n_words': 121}