~dlax

Toulouse, France

Recent activity

[PATCH hg.sr.ht] Do not rely on configuration to load hg_ssh module 3 days ago

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

# HG changeset patch
# User Denis Laxalde <denis.laxalde@logilab.fr>
# Date 1571302921 -7200
#      Thu Oct 17 11:02:01 2019 +0200
# Node ID cd45d54cac54765ba6256c097bba37d913a926fe
# Parent  3a5cf7d23f97209365cf37e8ce69a25616888a10
Do not rely on configuration to load hg_ssh module

Instead of relying on the "use-py3-hg" configuration option, we try to
import the hg_ssh module and fall back to the subprocess approach if
this fails.

diff --git a/hgsrht-shell b/hgsrht-shell
index 94d4c1c..b3a74d2 100755
[message trimmed]

Re: [PATCH sr.ht-docs 1/3] Fix a typo in hg email doc 3 days ago

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

Drew DeVault a écrit :
> Thanks! I pushed 1/3 and 2/3 - but refrained from 3/3, as a workaround
> is no replacement for a bugfix in libgit2.

Quite true. I didn't know the extended headers were actually not
required by git to import patches, so I'll send a patch for libgit2.
About the "diff --git ..." header, I'm not sure yet.

[PATCH 2 of 2 hg.sr.ht] Ensure "items" keys are bytes in our hg extension 4 days ago

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

# HG changeset patch
# User Denis Laxalde <denis.laxalde@logilab.fr>
# Date 1571234915 -7200
#      Wed Oct 16 16:08:35 2019 +0200
# Node ID 02d5cb0ee5f9c62a86c289f4dfd8ff0de761f42c
# Parent  b88240da75e385c2182e0f7a65ae3288d0098335
Ensure "items" keys are bytes in our hg extension

items' keys are used to %-format a bytes at the end of the command,
using an str results in a type error.

diff --git a/hgsrht/hgext/__init__.py b/hgsrht/hgext/__init__.py
index d5b278c..d5136b1 100644
--- a/hgsrht/hgext/__init__.py
[message trimmed]

[PATCH 1 of 2 hg.sr.ht] Fix bytes indexing in hg extension for Python 3 4 days ago

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

# HG changeset patch
# User Denis Laxalde <denis.laxalde@logilab.fr>
# Date 1571234037 -7200
#      Wed Oct 16 15:53:57 2019 +0200
# Node ID b88240da75e385c2182e0f7a65ae3288d0098335
# Parent  ca9c83f7d3257b705a5d46cf2198dbd5289d4d4a
Fix bytes indexing in hg extension for Python 3

Since bytes are sequences of integers, indexing and then comparing
returned value with another bytes does not work for value comparison.

We thus use .endswith() method to determine if 'incpath' endswith a '/'
and we use <bytes>[n:n+1] trick to extract a substring of the bytes
value.
[message trimmed]

[PATCH hg.sr.ht v2] Make our hg extension Python3-compatible 4 days ago

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

Essentially make literal strings bytestrings and replace
dict.iteritems() by items().

diff --git a/hgsrht/hgext/__init__.py b/hgsrht/hgext/__init__.py
index a38f35f..d18b9cf 100644
--- a/hgsrht/hgext/__init__.py
+++ b/hgsrht/hgext/__init__.py
@@ -17,26 +17,26 @@ command = registrar.command(cmdtable)
          _(b'[-r REV]'))
 def manifest2(ui, repo, rev=None, **opts):
     """like the manifest command, but with more info"""
-    char = {'l': '@', 'x': '*', '': '', 't': 'd'}
-    mode = {'l': '644', 'x': '755', '': '644', 't': '755'}
+    char = {b'l': b'@', b'x': b'*', b'': b'', b't': b'd'}
[message trimmed]

Re: [PATCH 1 of 2 hg.sr.ht] Let default value of --include be a list in manifest2 command 4 days ago

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

Please disregard this patch, it is wrong. The next one is incomplete
also, I'll re-send.

Re: [PATCH hg.sr.ht] Implement similar ssh access optimizations to gitsrht 5 days ago

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

Ludovic Chabant a écrit :
> Note that if you have a py3 install of mercurial, you can also preview
> running hg-ssh directly in-process (thus avoiding the cost of another
> python process spinning up) by setting a flag in your config (can’t
> remember, I’m on my phone, but it’s in the shell script)

Just tried it. Works fine as well, thanks!

[PATCH 2 of 2 hg.sr.ht] Make our hg extension Python3-compatible 5 days ago

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

# HG changeset patch
# User Denis Laxalde <denis.laxalde@logilab.fr>
# Date 1571142579 -7200
#      Tue Oct 15 14:29:39 2019 +0200
# Node ID 914a46ef288f70269018b885b57b94699a4d1390
# Parent  5da51e2d74eab9b782b0e69ad395f537d5ed11c3
Make our hg extension Python3-compatible

Essentially make literal strings bytestrings and replace
dict.iteritems() by items().

diff --git a/hgsrht/hgext/__init__.py b/hgsrht/hgext/__init__.py
index 2302a99..3e54fe5 100644
--- a/hgsrht/hgext/__init__.py
[message trimmed]

[PATCH 1 of 2 hg.sr.ht] Let default value of --include be a list in manifest2 command 5 days ago

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

# HG changeset patch
# User Denis Laxalde <denis.laxalde@logilab.fr>
# Date 1571142426 -7200
#      Tue Oct 15 14:27:06 2019 +0200
# Node ID 5da51e2d74eab9b782b0e69ad395f537d5ed11c3
# Parent  d8689fe9b53b48ca360ea587028b63cb61545767
Let default value of --include be a list in manifest2 command

As it in Mercurial's commands.

diff --git a/hgsrht/hgext/__init__.py b/hgsrht/hgext/__init__.py
index a38f35f..2302a99 100644
--- a/hgsrht/hgext/__init__.py
+++ b/hgsrht/hgext/__init__.py
[message trimmed]

Re: [PATCH hg.sr.ht] Implement similar ssh access optimizations to gitsrht 5 days ago

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

Tested locally, works fine as far as I can tell.
Thanks for working on this!