Re: AW: Issue with kallithea 0.6.2 in combination with mercurial hook

2020-12-04 Thread Mads Kiilerich
The update hook is built-in functionality. I don't think it makes sense 
to make it customizable. If you want it to do something else, just 
disable "Update repository after push (hg update)" under VCS and add 
your own custom hook instead.


I agree that the built-in hook should use the virtualenv hg.

But also, it seems like the root cause of your problem is that your 
system has a bad hg in $PATH. It should work if your system hg works.


It seems very odd that &2 should break 
anything. At most, it can expose/hide other breakage.


/Mads


On 12/4/20 10:16 AM, Benny Bürger wrote:


I got the same error when running my own script *with* Kallithea (but 
this has already been fixed by using 

The current error occurs in the internal hook from Kallithea 
*changegroup.update*


But unfortunately I cannot change the hook because it is read-only.

I will give it a try with virtualenv, but in my opinion the hook 
should be changeable


*Von:*Mads Kiilerich 
*Gesendet:* Freitag, 4. Dezember 2020 00:43
*An:* Benny Bürger ; kallithea-general@sfconservancy.org
*Betreff:* Re: Issue with kallithea 0.6.2 in combination with 
mercurial hook


If you can get the same error when launching your scripts manually 
without Kallithea, then the problem must be in your local system - not 
directly related to Kallithea.


Again, I can only advise against installing in /usr/local - it is very 
easy to get inconsistent installations, and very hard to clean up.


But also, I guess Kallithea should do something to ensure that we 
actually invoke the hg installed in a Kallithea virtualenv. You can do 
the same in your scripts.


/Mads

On 12/1/20 11:24 AM, Benny Bürger wrote:

Sorry, just noticed it was the wrong hook.

Actually the changegroup.update fails (hg update >&2)

I guess the >&2 is not working.

In my own script I did a hg clone and I had to add a  <mailto:m...@kiilerich.com>
*Gesendet:* Montag, 30. November 2020 17:59
*An:* Benny Bürger  <mailto:buer...@simba.de>;
kallithea-general@sfconservancy.org
<mailto:kallithea-general@sfconservancy.org>
*Betreff:* Re: Issue with kallithea 0.6.2 in combination with
mercurial hook

On 11/30/20 5:30 PM, Benny Bürger wrote:

Hi,

I use the pretxnchangegroup.check with a bash script.

The script executes but the error code is ignored because of
the following error:

Gegenseite: Traceback (most recent call last):

Gegenseite:   File "/usr/local/bin/hg", line 43, in 

Gegenseite: dispatch.run()

Gegenseite:   File "/usr/lib/python3.8/importlib/util.py",
line 245, in __getattribute__

Gegenseite: self.__spec__.loader.exec_module(self)

Gegenseite:   File "",
line 783, in exec_module

Gegenseite:   File "", line 219,
in _call_with_frames_removed

Gegenseite:   File
"/usr/local/lib/python3.8/dist-packages/mercurial/dispatch.py",
line 22, in 

Gegenseite: from .i18n import _

Gegenseite:   File "/usr/lib/python3.8/importlib/util.py",
line 245, in __getattribute__

Gegenseite: self.__spec__.loader.exec_module(self)

Gegenseite:   File
"/usr/local/lib/python3.8/dist-packages/mercurial/i18n.py",
line 15, in 

Gegenseite: from .pycompat import getattr

Gegenseite: ImportError: cannot import name 'getattr' from
'mercurial.pycompat'
(/usr/local/lib/python3.8/dist-packages/mercurial/pycompat.py)

Environment: Linux repository 5.4.0-48-generic #52-Ubuntu SMP
Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I used pip to install Kallithea and all dependencies…

Is the hook working when launched manually with python3?

It looks like a problem in the installation of /usr/local/bin/hg .
/usr/local/lib/python3.8/dist-packages/mercurial/pycompat.py must
be a version less than 5.2 if it doesn't have getattr . That one
year old version didn't have good support for Python 3. I suggest
using latest Mercurial version. Python3 support is still improving.

How was Kallithea installed? Using virtualenv?

How was /usr/local/bin/hg installed?

Instead of installing in /usr/local , I would suggest using the hg
in the Kallithea virtualenv.

/Mads



___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


AW: Issue with kallithea 0.6.2 in combination with mercurial hook

2020-12-04 Thread Benny Bürger
I got the same error when running my own script with Kallithea (but this has 
already been fixed by using 
Gesendet: Freitag, 4. Dezember 2020 00:43
An: Benny Bürger ; kallithea-general@sfconservancy.org
Betreff: Re: Issue with kallithea 0.6.2 in combination with mercurial hook

If you can get the same error when launching your scripts manually without 
Kallithea, then the problem must be in your local system - not directly related 
to Kallithea.

Again, I can only advise against installing in /usr/local - it is very easy to 
get inconsistent installations, and very hard to clean up.

But also, I guess Kallithea should do something to ensure that we actually 
invoke the hg installed in a Kallithea virtualenv. You can do the same in your 
scripts.

/Mads


On 12/1/20 11:24 AM, Benny Bürger wrote:
Sorry, just noticed it was the wrong hook.
Actually the changegroup.update fails (hg update >&2)
I guess the >&2 is not working.
In my own script I did a hg clone and I had to add a <mailto:m...@kiilerich.com>
Gesendet: Montag, 30. November 2020 17:59
An: Benny Bürger <mailto:buer...@simba.de>; 
kallithea-general@sfconservancy.org<mailto:kallithea-general@sfconservancy.org>
Betreff: Re: Issue with kallithea 0.6.2 in combination with mercurial hook

On 11/30/20 5:30 PM, Benny Bürger wrote:
Hi,

I use the pretxnchangegroup.check with a bash script.
The script executes but the error code is ignored because of the following 
error:

Gegenseite: Traceback (most recent call last):
Gegenseite:   File "/usr/local/bin/hg", line 43, in 
Gegenseite: dispatch.run()
Gegenseite:   File "/usr/lib/python3.8/importlib/util.py", line 245, in 
__getattribute__
Gegenseite: self.__spec__.loader.exec_module(self)
Gegenseite:   File "", line 783, in 
exec_module
Gegenseite:   File "", line 219, in 
_call_with_frames_removed
Gegenseite:   File 
"/usr/local/lib/python3.8/dist-packages/mercurial/dispatch.py", line 22, in 

Gegenseite: from .i18n import _
Gegenseite:   File "/usr/lib/python3.8/importlib/util.py", line 245, in 
__getattribute__
Gegenseite: self.__spec__.loader.exec_module(self)
Gegenseite:   File "/usr/local/lib/python3.8/dist-packages/mercurial/i18n.py", 
line 15, in 
Gegenseite: from .pycompat import getattr
Gegenseite: ImportError: cannot import name 'getattr' from 'mercurial.pycompat' 
(/usr/local/lib/python3.8/dist-packages/mercurial/pycompat.py)


Environment: Linux repository 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 
10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
 I used pip to install Kallithea and all dependencies...



Is the hook working when launched manually with python3?

It looks like a problem in the installation of /usr/local/bin/hg . 
/usr/local/lib/python3.8/dist-packages/mercurial/pycompat.py must be a version 
less than 5.2 if it doesn't have getattr . That one year old version didn't 
have good support for Python 3. I suggest using latest Mercurial version. 
Python3 support is still improving.
How was Kallithea installed? Using virtualenv?

How was /usr/local/bin/hg installed?

Instead of installing in /usr/local , I would suggest using the hg in the 
Kallithea virtualenv.

/Mads



___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


Re: Issue with kallithea 0.6.2 in combination with mercurial hook

2020-12-03 Thread Mads Kiilerich
If you can get the same error when launching your scripts manually 
without Kallithea, then the problem must be in your local system - not 
directly related to Kallithea.


Again, I can only advise against installing in /usr/local - it is very 
easy to get inconsistent installations, and very hard to clean up.


But also, I guess Kallithea should do something to ensure that we 
actually invoke the hg installed in a Kallithea virtualenv. You can do 
the same in your scripts.


/Mads


On 12/1/20 11:24 AM, Benny Bürger wrote:


Sorry, just noticed it was the wrong hook.

Actually the changegroup.update fails (hg update >&2)

I guess the >&2 is not working.

In my own script I did a hg clone and I had to add a order to work, otherwise I would get the same error.


Unfortunately I cannot change the update command because it is read-only.

I already have mercurial 5.4 installed, although did a test with 5.6 
but there was another error.


*Von:*Mads Kiilerich 
*Gesendet:* Montag, 30. November 2020 17:59
*An:* Benny Bürger ; kallithea-general@sfconservancy.org
*Betreff:* Re: Issue with kallithea 0.6.2 in combination with 
mercurial hook


On 11/30/20 5:30 PM, Benny Bürger wrote:

Hi,

I use the pretxnchangegroup.check with a bash script.

The script executes but the error code is ignored because of the
following error:

Gegenseite: Traceback (most recent call last):

Gegenseite:   File "/usr/local/bin/hg", line 43, in 

Gegenseite: dispatch.run()

Gegenseite:   File "/usr/lib/python3.8/importlib/util.py", line
245, in __getattribute__

Gegenseite: self.__spec__.loader.exec_module(self)

Gegenseite:   File "", line
783, in exec_module

Gegenseite:   File "", line 219, in
_call_with_frames_removed

Gegenseite:   File
"/usr/local/lib/python3.8/dist-packages/mercurial/dispatch.py",
line 22, in 

Gegenseite: from .i18n import _

Gegenseite:   File "/usr/lib/python3.8/importlib/util.py", line
245, in __getattribute__

Gegenseite: self.__spec__.loader.exec_module(self)

Gegenseite:   File
"/usr/local/lib/python3.8/dist-packages/mercurial/i18n.py", line
15, in 

Gegenseite: from .pycompat import getattr

Gegenseite: ImportError: cannot import name 'getattr' from
'mercurial.pycompat'
(/usr/local/lib/python3.8/dist-packages/mercurial/pycompat.py)

Environment: Linux repository 5.4.0-48-generic #52-Ubuntu SMP Thu
Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I used pip to install Kallithea and all dependencies…

Is the hook working when launched manually with python3?

It looks like a problem in the installation of /usr/local/bin/hg . 
/usr/local/lib/python3.8/dist-packages/mercurial/pycompat.py must be a 
version less than 5.2 if it doesn't have getattr . That one year old 
version didn't have good support for Python 3. I suggest using latest 
Mercurial version. Python3 support is still improving.


How was Kallithea installed? Using virtualenv?

How was /usr/local/bin/hg installed?

Instead of installing in /usr/local , I would suggest using the hg in 
the Kallithea virtualenv.


/Mads



___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


AW: Issue with kallithea 0.6.2 in combination with mercurial hook

2020-12-01 Thread Benny Bürger
Sorry, just noticed it was the wrong hook.
Actually the changegroup.update fails (hg update >&2)
I guess the >&2 is not working.
In my own script I did a hg clone and I had to add a 
Gesendet: Montag, 30. November 2020 17:59
An: Benny Bürger ; kallithea-general@sfconservancy.org
Betreff: Re: Issue with kallithea 0.6.2 in combination with mercurial hook

On 11/30/20 5:30 PM, Benny Bürger wrote:
Hi,

I use the pretxnchangegroup.check with a bash script.
The script executes but the error code is ignored because of the following 
error:

Gegenseite: Traceback (most recent call last):
Gegenseite:   File "/usr/local/bin/hg", line 43, in 
Gegenseite: dispatch.run()
Gegenseite:   File "/usr/lib/python3.8/importlib/util.py", line 245, in 
__getattribute__
Gegenseite: self.__spec__.loader.exec_module(self)
Gegenseite:   File "", line 783, in 
exec_module
Gegenseite:   File "", line 219, in 
_call_with_frames_removed
Gegenseite:   File 
"/usr/local/lib/python3.8/dist-packages/mercurial/dispatch.py", line 22, in 

Gegenseite: from .i18n import _
Gegenseite:   File "/usr/lib/python3.8/importlib/util.py", line 245, in 
__getattribute__
Gegenseite: self.__spec__.loader.exec_module(self)
Gegenseite:   File "/usr/local/lib/python3.8/dist-packages/mercurial/i18n.py", 
line 15, in 
Gegenseite: from .pycompat import getattr
Gegenseite: ImportError: cannot import name 'getattr' from 'mercurial.pycompat' 
(/usr/local/lib/python3.8/dist-packages/mercurial/pycompat.py)


Environment: Linux repository 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 
10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
 I used pip to install Kallithea and all dependencies...



Is the hook working when launched manually with python3?

It looks like a problem in the installation of /usr/local/bin/hg . 
/usr/local/lib/python3.8/dist-packages/mercurial/pycompat.py must be a version 
less than 5.2 if it doesn't have getattr . That one year old version didn't 
have good support for Python 3. I suggest using latest Mercurial version. 
Python3 support is still improving.
How was Kallithea installed? Using virtualenv?

How was /usr/local/bin/hg installed?

Instead of installing in /usr/local , I would suggest using the hg in the 
Kallithea virtualenv.

/Mads

___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


Re: Issue with kallithea 0.6.2 in combination with mercurial hook

2020-11-30 Thread Mads Kiilerich

On 11/30/20 5:30 PM, Benny Bürger wrote:


Hi,

I use the pretxnchangegroup.check with a bash script.

The script executes but the error code is ignored because of the 
following error:


Gegenseite: Traceback (most recent call last):

Gegenseite:   File "/usr/local/bin/hg", line 43, in 

Gegenseite: dispatch.run()

Gegenseite:   File "/usr/lib/python3.8/importlib/util.py", line 245, 
in __getattribute__


Gegenseite: self.__spec__.loader.exec_module(self)

Gegenseite:   File "", line 783, 
in exec_module


Gegenseite:   File "", line 219, in 
_call_with_frames_removed


Gegenseite:   File 
"/usr/local/lib/python3.8/dist-packages/mercurial/dispatch.py", line 
22, in 


Gegenseite: from .i18n import _

Gegenseite:   File "/usr/lib/python3.8/importlib/util.py", line 245, 
in __getattribute__


Gegenseite: self.__spec__.loader.exec_module(self)

Gegenseite:   File 
"/usr/local/lib/python3.8/dist-packages/mercurial/i18n.py", line 15, 
in 


Gegenseite: from .pycompat import getattr

Gegenseite: ImportError: cannot import name 'getattr' from 
'mercurial.pycompat' 
(/usr/local/lib/python3.8/dist-packages/mercurial/pycompat.py)


Environment: Linux repository 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 
10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


I used pip to install Kallithea and all dependencies…



Is the hook working when launched manually with python3?

It looks like a problem in the installation of /usr/local/bin/hg . 
/usr/local/lib/python3.8/dist-packages/mercurial/pycompat.py must be a 
version less than 5.2 if it doesn't have getattr . That one year old 
version didn't have good support for Python 3. I suggest using latest 
Mercurial version. Python3 support is still improving.


How was Kallithea installed? Using virtualenv?

How was /usr/local/bin/hg installed?

Instead of installing in /usr/local , I would suggest using the hg in 
the Kallithea virtualenv.


/Mads


___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


Issue with kallithea 0.6.2 in combination with mercurial hook

2020-11-30 Thread Benny Bürger
Hi,

I use the pretxnchangegroup.check with a bash script.
The script executes but the error code is ignored because of the following 
error:

Gegenseite: Traceback (most recent call last):
Gegenseite:   File "/usr/local/bin/hg", line 43, in 
Gegenseite: dispatch.run()
Gegenseite:   File "/usr/lib/python3.8/importlib/util.py", line 245, in 
__getattribute__
Gegenseite: self.__spec__.loader.exec_module(self)
Gegenseite:   File "", line 783, in 
exec_module
Gegenseite:   File "", line 219, in 
_call_with_frames_removed
Gegenseite:   File 
"/usr/local/lib/python3.8/dist-packages/mercurial/dispatch.py", line 22, in 

Gegenseite: from .i18n import _
Gegenseite:   File "/usr/lib/python3.8/importlib/util.py", line 245, in 
__getattribute__
Gegenseite: self.__spec__.loader.exec_module(self)
Gegenseite:   File "/usr/local/lib/python3.8/dist-packages/mercurial/i18n.py", 
line 15, in 
Gegenseite: from .pycompat import getattr
Gegenseite: ImportError: cannot import name 'getattr' from 'mercurial.pycompat' 
(/usr/local/lib/python3.8/dist-packages/mercurial/pycompat.py)


Environment: Linux repository 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 
10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
 I used pip to install Kallithea and all dependencies...
If you need any additional information feel free to ask.

Best regards,
Benny
___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general