~dlax

Toulouse, France

Recent activity

[PATCH todo.sr.ht] Fix background color of assign menu in dark mode 9 days ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

---
 scss/main.scss | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scss/main.scss b/scss/main.scss
index e89949d..e137d3c 100644
--- a/scss/main.scss
+++ b/scss/main.scss
@@ -161,7 +161,10 @@ select.form-control {

.assign {
  &[open] {
    background: #f5f5f5;
    background: $gray-300;
[message trimmed]

[PATCH todo.sr.ht] Use datetime.fromisoformat() to parse dates in tracker import 9 days ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

This would allow preserving original time zone information and also
handles negative UTC offset values.
---
 todosrht/tracker_import.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/todosrht/tracker_import.py b/todosrht/tracker_import.py
index 8dbe380..fd89311 100644
--- a/todosrht/tracker_import.py
+++ b/todosrht/tracker_import.py
@@ -18,9 +18,7 @@ from todosrht.webhooks import worker
our_upstream = get_origin("todo.sr.ht", external=True)

def _parse_date(date):
[message trimmed]

Re: [PATCH meta.sr.ht] Use html.unescape() for Python 3.9 compatibility 21 days ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

Drew DeVault a écrit :
> Is this backwards compatible with Python 3.8?
> 

Yes. html.unescape() is there from python 3.4 apparently 
(https://docs.python.org/3/library/html.html#html.unescape).

[PATCH meta.sr.ht] Use html.unescape() for Python 3.9 compatibility 22 days ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

Method unescape() of html.parser.HTMLParser class is deprecated and got
removed in Python 3.9. Use html.unescape() as recommended in
https://docs.python.org/3/whatsnew/3.9.html.
---
 metasrht/email.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/metasrht/email.py b/metasrht/email.py
index 6453651..ef50f9d 100644
--- a/metasrht/email.py
+++ b/metasrht/email.py
@@ -1,4 +1,4 @@
import html.parser
import html
[message trimmed]

Re: [PATCH hub.sr.ht v3] Make source repo unique by project 24 days ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

> Can you whip up a SQL query which identifies and removes (as separate
> steps) any rows which would be implicated by this constraint?

This would return ids of duplicated rows:

    SELECT array_agg(id) FROM source_repo
    GROUP BY project_id, remote_id, repo_type
    HAVING count(*) > 1;

and this would remove duplicates, keeping the latest, and return the ids
of deleted rows:

    DELETE from source_repo A
    USING source_repo B

[PATCH hub.sr.ht v3] Make source repo unique by project a month ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

We add a unique constraint on source_repo table to prevent multiple
links of the same remote repository to a given project.

The UI already prevents duplicates (from ef585b6e) but it seems better
to enforce this in the database model.
---
v3: add another forgotten "repo_type" in migration script.

 ...2917_make_source_repo_unique_by_project.py | 32 +++++++++++++++++++
 hubsrht/types/sourcerepo.py                   |  6 ++++
 2 files changed, 38 insertions(+)
 create mode 100644 hubsrht/alembic/versions/9deca12b2917_make_source_repo_unique_by_project.py

diff --git a/hubsrht/alembic/versions/9deca12b2917_make_source_repo_unique_by_project.py b/hubsrht/alembic/versions/9deca12b2917_make_source_repo_unique_by_project.py
[message trimmed]

[PATCH hub.sr.ht v2] Make source repo unique by project a month ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

We add a unique constraint on source_repo table to prevent multiple
links of the same remote repository to a given project.

The UI already prevents duplicates (from ef585b6e) but it seems better
to enforce this in the database model.
---
v2 adds the "repo_type" column in the constraint.

 ...2917_make_source_repo_unique_by_project.py | 32 +++++++++++++++++++
 hubsrht/types/sourcerepo.py                   |  6 ++++
 2 files changed, 38 insertions(+)
 create mode 100644 hubsrht/alembic/versions/9deca12b2917_make_source_repo_unique_by_project.py

diff --git a/hubsrht/alembic/versions/9deca12b2917_make_source_repo_unique_by_project.py b/hubsrht/alembic/versions/9deca12b2917_make_source_repo_unique_by_project.py
[message trimmed]

[PATCH hub.sr.ht] Make source repo unique by project a month ago

From to ~sircmpwn/sr.ht-dev

From: Denis Laxalde <denis@laxalde.org>

We add a unique constraint on source_repo table to prevent multiple
links of the same remote repository to a given project.

The UI already prevents duplicates (from ef585b6e) but it seems better
to enforce this in the database model.
---
 ...2917_make_source_repo_unique_by_project.py | 32 +++++++++++++++++++
 hubsrht/types/sourcerepo.py                   |  5 +++
 2 files changed, 37 insertions(+)
 create mode 100644 hubsrht/alembic/versions/9deca12b2917_make_source_repo_unique_by_project.py

diff --git a/hubsrht/alembic/versions/9deca12b2917_make_source_repo_unique_by_project.py b/hubsrht/alembic/versions/9deca12b2917_make_source_repo_unique_by_project.py
[message trimmed]

[PATCH hg.sr.ht] Correctly set 'pkgver' in Debian build manifest a month ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

# HG changeset patch
# User Denis Laxalde <denis@laxalde.org>
# Date 1608019680 -3600
#      Tue Dec 15 09:08:00 2020 +0100
# Node ID 1671a7c0c51a5c83e1670681e15c4601f9bc818d
# Parent  83869a81c6d6649aa68f153e99a6d001a6a7da07
Correctly set 'pkgver' in Debian build manifest

The previous definition of 'pkgver' was wrong when on a tag changeset
(the one named 'Added tag <tagname> for changeset <revhash>').
Typically, on changeset 83869a81c6d6 (tag 0.26.21), pkgver would be
'0.26.21-1-83869a81c6d6' instead of simply '0.26.21'.

We fix that by checking if the distance to latest tag is 1 and issue the
[message trimmed]

[PATCH git-rebase.io v2] Add a section about 'git rebase --autosquash' 2 months ago

From to ~sircmpwn/public-inbox

From: Denis Laxalde <denis@laxalde.org>

---
 index.html | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/index.html b/index.html
index 3be9b14..f0c92d9 100644
--- a/index.html
+++ b/index.html
@@ -73,6 +73,7 @@
        <ol>
          <li><a href="#amending">Amending your last commit</a></li>
          <li><a href="#fixup">Fixing up older commits</a></li>
[message trimmed]