<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.E-MailFormatvorlage19
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.E-MailFormatvorlage20
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.E-MailFormatvorlage21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I got the same error when running my own script
<b>with</b> Kallithea (but this has already been fixed by using <dev/null)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">The current error occurs in the internal hook from Kallithea
<b>changegroup.update</b> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">But unfortunately I cannot change the hook because it is read-only.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I will give it a try with virtualenv, but in my opinion the hook should be changeable<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:DE"><img width="718" height="109" style="width:7.4791in;height:1.1354in" id="Grafik_x0020_1" src="cid:image001.png@01D6CA25.2B4D8670"></span><span lang="EN-US" style="color:#1F497D"><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:DE"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="mso-fareast-language:DE">Von:</span></b><span style="mso-fareast-language:DE"> Mads Kiilerich <mads@kiilerich.com>
<br>
<b>Gesendet:</b> Freitag, 4. Dezember 2020 00:43<br>
<b>An:</b> Benny Bürger <buerger@simba.de>; kallithea-general@sfconservancy.org<br>
<b>Betreff:</b> Re: Issue with kallithea 0.6.2 in combination with mercurial hook<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">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.<span style="font-size:12.0pt;mso-fareast-language:DE"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Again, I can only advise against installing in /usr/local - it is very easy to get inconsistent installations, and very hard to clean up.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">/Mads<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">On 12/1/20 11:24 AM, Benny Bürger wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Sorry, just noticed it was the wrong hook.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Actually the changegroup.update fails (hg update >&2)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I guess the >&2 is not working.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">In my own script I did a hg clone and I had to add a </dev/null in order to work, otherwise I would get the same error.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Unfortunately I cannot change the update command because it is read-only.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I already have mercurial 5.4 installed, although did a test with 5.6 but there was another error.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="mso-fareast-language:DE">Von:</span></b><span style="mso-fareast-language:DE"> Mads Kiilerich
<a href="mailto:mads@kiilerich.com"><mads@kiilerich.com></a> <br>
<b>Gesendet:</b> Montag, 30. </span><span lang="EN-US" style="mso-fareast-language:DE">November 2020 17:59<br>
<b>An:</b> Benny Bürger <a href="mailto:buerger@simba.de"><buerger@simba.de></a>;
<a href="mailto:kallithea-general@sfconservancy.org">kallithea-general@sfconservancy.org</a><br>
<b>Betreff:</b> Re: Issue with kallithea 0.6.2 in combination with mercurial hook</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span lang="EN-US">On 11/30/20 5:30 PM, Benny Bürger wrote:</span><o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US">Hi,</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">I use the pretxnchangegroup.check with a bash script.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">The script executes but the error code is ignored because of the following error:</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Gegenseite: Traceback (most recent call last):</span><o:p></o:p></p>
<p class="MsoNormal">Gegenseite: File "/usr/local/bin/hg", line 43, in <module><o:p></o:p></p>
<p class="MsoNormal">Gegenseite: dispatch.run()<o:p></o:p></p>
<p class="MsoNormal">Gegenseite: File "/usr/lib/python3.8/importlib/util.py", line 245, in __getattribute__<o:p></o:p></p>
<p class="MsoNormal">Gegenseite: self.__spec__.loader.exec_module(self)<o:p></o:p></p>
<p class="MsoNormal">Gegenseite: File "<frozen importlib._bootstrap_external>", line 783, in exec_module<o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Gegenseite: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Gegenseite: File "/usr/local/lib/python3.8/dist-packages/mercurial/dispatch.py", line 22, in <module></span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Gegenseite: from .i18n import _</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Gegenseite: File "/usr/lib/python3.8/importlib/util.py", line 245, in __getattribute__</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Gegenseite: self.__spec__.loader.exec_module(self)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Gegenseite: File "/usr/local/lib/python3.8/dist-packages/mercurial/i18n.py", line 15, in <module></span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Gegenseite: from .pycompat import getattr</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Gegenseite: ImportError: cannot import name 'getattr' from 'mercurial.pycompat' (/usr/local/lib/python3.8/dist-packages/mercurial/pycompat.py)
</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">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</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> I used pip to install Kallithea and all dependencies…</span><o:p></o:p></p>
</blockquote>
<p><span lang="EN-US"> </span><o:p></o:p></p>
<p><span lang="EN-US">Is the hook working when launched manually with python3?</span><o:p></o:p></p>
<p><span lang="EN-US">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.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt">How was Kallithea installed? Using virtualenv?
</span><o:p></o:p></p>
<p><span lang="EN-US">How was /usr/local/bin/hg installed?</span><o:p></o:p></p>
<p><span lang="EN-US">Instead of installing in /usr/local , I would suggest using the hg in the Kallithea virtualenv.</span><o:p></o:p></p>
<p>/Mads<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> </span><o:p></o:p></p>
</blockquote>
<p><o:p> </o:p></p>
</div>
</body>
</html>