Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ArchAdmin(admin.ModelAdmin):


class RepoAdmin(admin.ModelAdmin):
list_display = ('name', 'testing', 'staging', 'bugs_project', 'bugs_category', 'svn_root')
list_display = ('name', 'testing', 'staging', 'bugs_project', 'bugs_category')
list_filter = ('testing', 'staging')
search_fields = ('name',)

Expand Down
170 changes: 79 additions & 91 deletions main/fixtures/repos.json
Original file line number Diff line number Diff line change
@@ -1,146 +1,134 @@
[
{
"pk": 5,
"model": "main.repo",
"pk": 5,
"model": "main.repo",
"fields": {
"bugs_category": 33,
"staging": false,
"bugs_category": 33,
"staging": false,
"name": "Extra-Testing",
"bugs_project": 5,
"svn_root": "packages",
"bugs_project": 5,
"testing": true
}
},
},
{
"pk": 15,
"model": "main.repo",
"pk": 15,
"model": "main.repo",
"fields": {
"bugs_category": 33,
"staging": true,
"bugs_category": 33,
"staging": true,
"name": "Extra-Staging",
"bugs_project": 5,
"svn_root": "packages",
"bugs_project": 5,
"testing": false
}
},
},
{
"pk": 1,
"model": "main.repo",
"pk": 1,
"model": "main.repo",
"fields": {
"bugs_category": 31,
"staging": false,
"name": "Core",
"bugs_project": 1,
"svn_root": "packages",
"bugs_category": 31,
"staging": false,
"name": "Core",
"bugs_project": 1,
"testing": false
}
},
},
{
"pk": 2,
"model": "main.repo",
"pk": 2,
"model": "main.repo",
"fields": {
"bugs_category": 2,
"staging": false,
"name": "Extra",
"bugs_project": 1,
"svn_root": "packages",
"bugs_category": 2,
"staging": false,
"name": "Extra",
"bugs_project": 1,
"testing": false
}
},
},
{
"pk": 13,
"model": "main.repo",
"pk": 13,
"model": "main.repo",
"fields": {
"bugs_category": 10,
"staging": true,
"name": "Gnome-Unstable",
"bugs_project": 1,
"svn_root": "packages",
"bugs_category": 10,
"staging": true,
"name": "Gnome-Unstable",
"bugs_project": 1,
"testing": false
}
},
},
{
"pk": 12,
"model": "main.repo",
"pk": 12,
"model": "main.repo",
"fields": {
"bugs_category": 10,
"staging": true,
"name": "KDE-Unstable",
"bugs_project": 1,
"svn_root": "packages",
"bugs_category": 10,
"staging": true,
"name": "KDE-Unstable",
"bugs_project": 1,
"testing": false
}
},
},
{
"pk": 7,
"model": "main.repo",
"pk": 7,
"model": "main.repo",
"fields": {
"bugs_category": 46,
"staging": false,
"name": "Multilib",
"bugs_project": 5,
"svn_root": "community",
"bugs_category": 46,
"staging": false,
"name": "Multilib",
"bugs_project": 5,
"testing": false
}
},
},
{
"pk": 14,
"model": "main.repo",
"pk": 14,
"model": "main.repo",
"fields": {
"bugs_category": 46,
"staging": true,
"name": "Multilib-Staging",
"bugs_project": 5,
"svn_root": "community",
"bugs_category": 46,
"staging": true,
"name": "Multilib-Staging",
"bugs_project": 5,
"testing": false
}
},
},
{
"pk": 8,
"model": "main.repo",
"pk": 8,
"model": "main.repo",
"fields": {
"bugs_category": 46,
"staging": false,
"name": "Multilib-Testing",
"bugs_project": 5,
"svn_root": "community",
"bugs_category": 46,
"staging": false,
"name": "Multilib-Testing",
"bugs_project": 5,
"testing": true
}
},
},
{
"pk": 10,
"model": "main.repo",
"pk": 10,
"model": "main.repo",
"fields": {
"bugs_category": 10,
"staging": true,
"name": "Staging",
"bugs_project": 1,
"svn_root": "packages",
"bugs_category": 10,
"staging": true,
"name": "Staging",
"bugs_project": 1,
"testing": false
}
},
},
{
"pk": 3,
"model": "main.repo",
"pk": 3,
"model": "main.repo",
"fields": {
"bugs_category": 10,
"staging": false,
"bugs_category": 10,
"staging": false,
"name": "Core-Testing",
"bugs_project": 1,
"svn_root": "packages",
"bugs_project": 1,
"testing": true
}
},
{
"pk": 16,
"model": "main.repo",
"pk": 16,
"model": "main.repo",
"fields": {
"bugs_category": 10,
"staging": true,
"bugs_category": 10,
"staging": true,
"name": "Core-Staging",
"bugs_project": 1,
"svn_root": "packages",
"bugs_project": 1,
"testing": false
}
}
]
]
17 changes: 17 additions & 0 deletions main/migrations/0006_remove_repo_svn_root.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 5.2.13 on 2026-04-11 14:51

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('main', '0005_merge_0004_rebuilderdstatus_build_id_0004_soname'),
]

operations = [
migrations.RemoveField(
model_name='repo',
name='svn_root',
),
]
2 changes: 0 additions & 2 deletions main/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ class Repo(models.Model):
default=1, help_text="Flyspray project ID for this repository.")
bugs_category = models.SmallIntegerField(
default=2, help_text="Flyspray category ID for this repository.")
svn_root = models.CharField(
max_length=64, help_text="SVN root (e.g. path) for this repository.")

def __str__(self):
return self.name
Expand Down
4 changes: 0 additions & 4 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,6 @@
PGP_SERVER = 'keyserver.ubuntu.com'
PGP_SERVER_SECURE = True

# URL for SVN access for fetching commit messages (note absence of packages or
# community bit on the end, repo.svn_root is appended)
SVN_BASE_URL = 'svn://svn.archlinux.org/'

GITLAB_PACKAGES_REPO = 'https://gitlab.archlinux.org/archlinux/packaging/packages'
GITLAB_PACKAGE_REPO = 'archlinux/packaging/packages'
GITLAB_INSTANCE = 'gitlab.archlinux.org'
Expand Down
5 changes: 1 addition & 4 deletions templates/todolists/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ <h2>{{ list.kind_str | title }} Todo List {{ list.name }}</h2>
</div>

<div class="todo-pkgbases">
<p>Link to lists of pkgbase values:</p>
<ul>{% for svn_root in svn_roots %}
<li><a href="pkgbases/{{ svn_root }}/">{{ svn_root }}</a></li>
{% endfor %}</ul>
<p><a href="pkgbases/">List of pkgbase values</a></p>
</div>

<div class="box filter-criteria">
Expand Down
3 changes: 1 addition & 2 deletions todolists/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
permission_required('todolists.delete_todolist')(DeleteTodolist.as_view())),
re_path(r'^(?P<slug>[-\w]+)/flag/(?P<pkg_id>\d+)/$',
permission_required('todolists.change_todolistpackage')(flag)),
re_path(r'^(?P<slug>[-\w]+)/pkgbases/(?P<svn_root>[a-z]+)/$',
list_pkgbases),
re_path(r'^(?P<slug>[-\w]+)/pkgbases/$', list_pkgbases),
]

# vim: set ts=4 sw=4 et:
12 changes: 4 additions & 8 deletions todolists/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
from django.core.mail import send_mail
from django.db import transaction
from django.http import HttpResponse
from django.shortcuts import get_list_or_404, get_object_or_404, redirect, render
from django.shortcuts import get_object_or_404, redirect, render
from django.template import loader
from django.utils.timezone import now
from django.views.decorators.cache import never_cache
from django.views.generic import DeleteView, ListView

from main.models import Package, Repo
from main.models import Package
from main.utils import find_unique_slug
from packages.utils import PackageJSONEncoder, attach_maintainers

Expand Down Expand Up @@ -59,8 +59,6 @@ def flag(request, slug, pkg_id):

def view(request, slug):
todolist = get_object_or_404(Todolist, slug=slug)
svn_roots = Repo.objects.values_list(
'svn_root', flat=True).order_by().distinct()
# we don't hold onto the result, but the objects are the same here,
# so accessing maintainers in the template is now cheap
attach_maintainers(todolist.packages())
Expand All @@ -69,20 +67,18 @@ def view(request, slug):
repos = {tp.repo for tp in todolist.packages()}
context = {
'list': todolist,
'svn_roots': svn_roots,
'arches': sorted(arches),
'repos': sorted(repos),
}
return render(request, 'todolists/view.html', context)


def list_pkgbases(request, slug, svn_root):
def list_pkgbases(request, slug):
'''Used to make bulk moves of packages a lot easier.'''
todolist = get_object_or_404(Todolist, slug=slug)
repos = get_list_or_404(Repo, svn_root=svn_root)
pkgbases = TodolistPackage.objects.values_list(
'pkgbase', flat=True).filter(
todolist=todolist, repo__in=repos, removed__isnull=True).order_by(
todolist=todolist, removed__isnull=True).order_by(
'pkgbase').distinct()
return HttpResponse('\n'.join(pkgbases), content_type='text/plain')

Expand Down
Loading