There is currently a mismatch, causing for example project creation via
the web interface to fail, because the validation code is using the enum
keys, which are lowercase, but everything else uses uppercase.
Simply use uppercase everywhere, like already the case in other
services.
Unfortunately "hg clone" seems to have issues with the redirect to the
version with the trailing slash, but it's better than the raw HTML dump
from before
-- >8 --
nabijaczleweli@tarta:~/uwu$ hg clone http://127.0.0.1:5014/~nabijaczleweli/projeq wellb
abort: HTTP Error 308: PERMANENT REDIRECT
nabijaczleweli@tarta:~/uwu$ hg clone http://127.0.0.1:5014/~nabijaczleweli/projeq/ wellb
abort: 'http://127.0.0.1:5014/~nabijaczleweli/projeq/' does not appear to be an hg repository:
---%<--- (text/plain; charset=utf-8)
You have tried to clone a project from sourcehat, but you probably meant to
clone a specific hg repository for this project instead. A single project on
sourcehat often has more than one hg repository.
You can visit the following URL:
http://127.0.0.1:5014/~nabijaczleweli/projeq/sources
To the browse source repositories for this project.
---%<---
!
nabijaczleweli@tarta:~/uwu$
-- >8 --
-- >8 --
nabijaczleweli@tarta:~/uwu/git$ strace -f -o ss git clone http://127.0.0.1:5014/~nabijaczleweli/projeq
Cloning into 'projeq'...
fatal: remote error:
This is a sourcehat project, which amalgamates multiple source repositories,
issue trackers, and mailing lists.
You can visit
http://127.0.0.1:5014/~nabijaczleweli/projeq/sources
to pick a specific source.
nabijaczleweli@tarta:~/uwu/git$
-- >8 --
Returning a non-ERR here and going down to a pack is possible
(confer https://twitter.com/nabijaczleweli/status/1296062752516079617)
but errors later down the line are either more verbose and hint at
implementation errors, or leave repositories in a sticky state.
Ref: ~sircmpwn/hub.sr.ht#49
SQLAlchemy's internal cascade handling is the most miserable, broken
piece of shit I have ever had the displeasure of using. So we circumvent
it entirely and let the SQL server do the right thing.
A word of advice: don't use SQLAlchemy for new projects.