~sircmpwn/sr.ht-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH hg.sr.ht] Make repo names match [A-Za-z0-9._-]+

Details
Message ID
<88c2d260df4b17c35935.1628409036@bellwether.localdomain>
DKIM signature
pass
Download raw message
Patch: +2 -2
# HG changeset patch
# User Sol Fisher Romanoff <sol@solfisher.com>
# Date 1628407625 -10800
#      Sun Aug 08 10:27:05 2021 +0300
# Node ID 88c2d260df4b17c3593566e8a4a75d39f7268815
# Parent  24906043b09ea11bc9a3bee491ef2f845e96b464
Make repo names match [A-Za-z0-9._-]+

Repository names in URLs are now case-insensitive --
This might break existing repositories.

diff --git a/hgsrht-shell b/hgsrht-shell
--- a/hgsrht-shell
+++ b/hgsrht-shell
@@ -201,9 +201,9 @@
    if owner_name != username:
        raise _RepoNotFound("access", "repository not found")

    if not re.match(r'^[A-Za-z._-][A-Za-z0-9._-]*$', repo_name):
    if not re.match(r'^[A-Za-z0-9._-]+$', repo_name):
        raise _RepoNotFound("insert",
                "repository name must match [A-Za-z._-][A-Za-z0-9._-]*")
                "repository name must match [A-Za-z0-9._-]+")

    query = con.execute("""
    INSERT INTO repository (
Details
Message ID
<d8762cc4-ca01-47a3-a68a-77922f81d636@www.fastmail.com>
In-Reply-To
<88c2d260df4b17c35935.1628409036@bellwether.localdomain> (view parent)
DKIM signature
pass
Download raw message
Hi!

I don't quite understand the change and what it fixes. It looks like it
just allows to find repositories whose name start with a number? Or am I
misreading the code?
Details
Message ID
<A308869C-6FA2-4F33-94DC-154BA4C0FDFB@solfisher.com>
In-Reply-To
<d8762cc4-ca01-47a3-a68a-77922f81d636@www.fastmail.com> (view parent)
DKIM signature
pass
Download raw message
Yes! Recently I've made changes across many sr.ht services
to standardize the naming restrictions. It's been pushed upstream,
so now scm.sr.ht accepts [A-Za-z0-9._-]+
Reply to thread Export thread (mbox)