<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<div class="moz-cite-prefix">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.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Again, I can only advise against
installing in /usr/local - it is very easy to get inconsistent
installations, and very hard to clean up.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">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.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">/Mads</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 12/1/20 11:24 AM, Benny Bürger
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:54f742598b60420d933e5abe6da8ec89@simba.de">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<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;}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]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">Sorry,
just noticed it was the wrong hook.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">Actually
the changegroup.update fails (hg update >&2)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">I
guess the >&2 is not working.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">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 style="color:#1F497D" lang="EN-US">Unfortunately
I cannot change the update command because it is read-only.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">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
<a class="moz-txt-link-rfc2396E" href="mailto:mads@kiilerich.com"><mads@kiilerich.com></a>
<br>
<b>Gesendet:</b> Montag, 30. </span><span
style="mso-fareast-language:DE" lang="EN-US">November
2020 17:59<br>
<b>An:</b> Benny Bürger <a class="moz-txt-link-rfc2396E" href="mailto:buerger@simba.de"><buerger@simba.de></a>;
<a class="moz-txt-link-abbreviated" 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<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
style="font-size:12.0pt;mso-fareast-language:DE"
lang="EN-US"><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
style="font-size:12.0pt;font-family:"Times New
Roman",serif;mso-fareast-language:DE" lang="EN-US">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>
</blockquote>
<p><br>
</p>
</body>
</html>