~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
1

[PATCH hg.sr.ht] Fix PG constraint violation when pushing a non-existant repo

Peter Sanchez <peter@netlandish.com>
Details
Message ID
<c1704b5bd44b77157165.1621894117@thinkpad>
DKIM signature
missing
Download raw message
Patch: +3 -2
# HG changeset patch
# User Peter Sanchez <peter@netlandish.com>
# Date 1621894109 25200
#      Mon May 24 15:08:29 2021 -0700
# Node ID c1704b5bd44b771571655ffbf0c09b1de5430c4f
# Parent  be239130cba9836476f0a51673acde166179e4bc
Fix PG constraint violation when pushing a non-existant repo.

diff --git a/hgsrht-shell b/hgsrht-shell
--- a/hgsrht-shell
+++ b/hgsrht-shell
@@ -212,11 +212,12 @@ def _do_get_or_create_repo(path, user_id
        name,
        owner_id,
        path,
        visibility
        visibility,
        is_non_publishing
    ) VALUES (
        NOW() at time zone 'utc',
        NOW() at time zone 'utc',
        %(repo_name)s, %(owner_id)s, %(path)s, 'autocreated'
        %(repo_name)s, %(owner_id)s, %(path)s, 'autocreated', false
    ) RETURNING id;""", repo_name=repo_name, owner_id=owner_id, path=path)
    row = query.fetchone()
    if row is None:
Details
Message ID
<dfccef6a-08fe-4842-9263-756a9d70b0b3@www.fastmail.com>
In-Reply-To
<c1704b5bd44b77157165.1621894117@thinkpad> (view parent)
DKIM signature
pass
Download raw message
Hi!  Thanks for the private poke -- I realized that the List-IDs for
the sourcehut mailing lists seem to have changed, and my filters were
therefore failing, making it look like there was no hgsrht patches in
my queue...

It looks like Drew already merged it but didn't tag a new release for
deployment. I just did that, so it should be live now.

Thanks!
Reply to thread Export thread (mbox)