<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)">
<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-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">Sorry, just noticed it was the wrong hook.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Actually the changegroup.update fails (hg update >&2)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I guess the >&2 is not working.<o:p></o:p></span></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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Unfortunately I cannot change the update command because it is read-only.<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 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.<o:p></o:p></span></p>
<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> Montag, 30. </span><span lang="EN-US" style="mso-fareast-language:DE">November 2020 17:59<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"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">On 11/30/20 5:30 PM, Benny Bürger wrote:</span><span lang="EN-US" style="font-size:12.0pt;mso-fareast-language:DE"><o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I use the pretxnchangegroup.check with a bash script.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The script executes but the error code is ignored because of the following error:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Gegenseite: Traceback (most recent call last):<o:p></o:p></span></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<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Gegenseite: File "/usr/local/lib/python3.8/dist-packages/mercurial/dispatch.py", line 22, in <module><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Gegenseite: from .i18n import _<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Gegenseite: File "/usr/lib/python3.8/importlib/util.py", line 245, in __getattribute__<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Gegenseite: self.__spec__.loader.exec_module(self)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Gegenseite: File "/usr/local/lib/python3.8/dist-packages/mercurial/i18n.py", line 15, in <module><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Gegenseite: from .pycompat import getattr<o:p></o:p></span></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)
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></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<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> I used pip to install Kallithea and all dependencies…<o:p></o:p></span></p>
</blockquote>
<p><span lang="EN-US"><o:p> </o:p></span></p>
<p><span lang="EN-US">Is the hook working when launched manually with python3?<o:p></o:p></span></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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:DE">How was Kallithea installed? Using virtualenv?
<o:p></o:p></span></p>
<p><span lang="EN-US">How was /usr/local/bin/hg installed?<o:p></o:p></span></p>
<p><span lang="EN-US">Instead of installing in /usr/local , I would suggest using the hg in the Kallithea virtualenv.<o:p></o:p></span></p>
<p>/Mads<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:DE"><o:p> </o:p></span></p>
</div>
</body>
</html>