<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<div class="moz-cite-prefix">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.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">I agree that the built-in hook should
use the virtualenv hg.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">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.<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">It seems very odd that <dev/null
should fix anything or >&2 should break anything. At most,
it can expose/hide other breakage.</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/4/20 10:16 AM, Benny Bürger
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:02708fae61c84ef8aebbce7bdc0ebff4@simba.de">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<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;}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">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 style="color:#1F497D" lang="EN-US">The
current error occurs in the internal hook from Kallithea
<b>changegroup.update</b> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">But
unfortunately I cannot change the hook because it is
read-only.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">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 style="color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="color:#1F497D;mso-fareast-language:DE"><img
style="width:7.4791in;height:1.1354in" id="Grafik_x0020_1"
src="cid:part1.1454D1B0.8566D7C2@kiilerich.com" class=""
width="718" height="109"></span><span
style="color:#1F497D" lang="EN-US"><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
<a class="moz-txt-link-rfc2396E" href="mailto:mads@kiilerich.com"><mads@kiilerich.com></a>
<br>
<b>Gesendet:</b> Freitag, 4. Dezember 2020 00:43<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"><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 style="color:#1F497D" lang="EN-US">Sorry,
just noticed it was the wrong hook.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">Actually
the changegroup.update fails (hg update >&2)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">I
guess the >&2 is not working.</span><o:p></o:p></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.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">Unfortunately
I cannot change the update command because it is
read-only.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"> </span><o:p></o:p></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.</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"
moz-do-not-send="true"><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
href="mailto:buerger@simba.de"
moz-do-not-send="true"><buerger@simba.de></a>;
<a href="mailto:kallithea-general@sfconservancy.org"
moz-do-not-send="true">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 style="font-size:12.0pt"
lang="EN-US">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>
</blockquote>
<p><br>
</p>
</body>
</html>