5.3 builds

198 views
Skip to first unread message

Matt Harbison

unread,
Mar 5, 2020, 9:10:46 PM3/5/20
to TortoiseHg Developers
These Windows and macOS builds have hg 5.3.1:


Still hoping to get these on www.mercurial-scm.org at some point, and should have a 5.3.1 build in the next couple of days if no issues pop up.

Daniel Comeau

unread,
Mar 6, 2020, 9:41:50 AM3/6/20
to TortoiseHg Developers
When trying to clone a Git repository (using the HgGit extension), I get an error message:

abort: No module named brotli!
[Code: 255]

My clone command:

hg clone --verbose https://github.com/js-cookie/js-cookie.git "C:\Temp\js-cookie HgGit Test"

Daniel Comeau

Matt Harbison

unread,
Mar 6, 2020, 10:43:59 PM3/6/20
to TortoiseHg Developers
On Friday, March 6, 2020 at 9:41:50 AM UTC-5, Daniel Comeau wrote:
When trying to clone a Git repository (using the HgGit extension), I get an error message:

abort: No module named brotli!
[Code: 255]

My clone command:

hg clone --verbose https://github.com/js-cookie/js-cookie.git "C:\Temp\js-cookie HgGit Test"

Daniel Comeau

It looks like this is mentioned towards the end of this bug report:


I'm not sure that I'm comfortable downgrading urllib3 (which is a dependency of requests), and then hacking up certifi to work with py2exe.  This build process is crazy as it is.  Also, I'm not sure if hg-git supports 5.3 yet.

I'll look into trying to get the user level site-package visible to the app like on macOS, so you can install hg-git (and whatever dependencies) yourself.  That will probably be better if hg-git is lagging behind anyway.  In the meantime, you might want to look at the suggestion in that bug report about hacking library.zip.

Matt Harbison

unread,
Mar 7, 2020, 12:40:06 AM3/7/20
to TortoiseHg Developers
Apparently py2exe doesn't run site.py, so it doesn't run the custom sitecustomize.py, so we can't use the same mechanism as the macOS app.  But I see that contrib/hg is the base script run by py2exe, and it already drops cwd from `sys.path`.  Yuya, do you think it's reasonable to:

    - extend `sys.path` there with `os.path.join(os.environ['APPDATA'], 'Python', 'Python2.7', 'site-packages')` (which corresponds to `pip install --user`)
    - drop hg-git and dependencies
    - tell users that it's on them to install hg-git dependencies via pip, and clone hg-git from source

?

It seems like with hg-git lagging behind a bit for awhile now and the complex dependencies, it's not something we can bundle well.  But this would still provide a mechanism to use it.

Yuya Nishihara

unread,
Mar 8, 2020, 12:17:46 AM3/8/20
to thg...@googlegroups.com
I'm okay with that. Windows packaging sucks in general, so let's make it
easier for us to manage.

Pierre-Yves David

unread,
Mar 8, 2020, 7:36:11 AM3/8/20
to thg...@googlegroups.com, Yuya Nishihara, Manuel Jacob
As far as I know, hg-git as a pretty large user base. What would be the
official way to set it up after this get dropped ?

--
Pierre-Yves David

Matt Harbison

unread,
Mar 8, 2020, 9:24:28 AM3/8/20
to thg...@googlegroups.com, Yuya Nishihara, Manuel Jacob
It looks like it’s been broken on Windows for a long time. (See that bug report I referenced, or search for hg-git on the bug tracker).

That said, it *should* be as simple as:

$ py -2 -m pip install —user dulwich brotli urllib3
# change `extensions.hggit=` to `extensions.hggit=path/to/local/clone`

I tried something like that last night by building the installer with the change proposed above, and deleting those dependencies from library.zip. The stacktrace changed so that now it complains about not being able to find `dulwich.errors`. There’s a thg bug report about that too, but no helpful info there. When I import it running system python, it works. So it should work here too.

Matt Harbison

unread,
Mar 8, 2020, 7:39:11 PM3/8/20
to TortoiseHg Developers
On Friday, March 6, 2020 at 9:41:50 AM UTC-5, Daniel Comeau wrote:
When trying to clone a Git repository (using the HgGit extension), I get an error message:

abort: No module named brotli!
[Code: 255]

My clone command:

hg clone --verbose https://github.com/js-cookie/js-cookie.git "C:\Temp\js-cookie HgGit Test"

Daniel Comeau

Give this build a try:


You will need to have python2.7 installed somewhere, and install the dependencies manually:

    pip2 install --user dulwich urllib3 brotli ipaddress

This build looks for extra packages in %APPDATA%\python\python27\site-packages, so you *must* use the `--user` flag to put them there.  For the record, that installed brotli-1.0.7 dulwich-0.19.15 ipaddress-1.0.23 and urllib3-1.25.8.  I ran hg-git 6479726a6ff9 from source, which I got here:


Please report back any issues, so we can get the 5.3.1 build out.  Maybe we could keep bundling those dependencies, but it seems like we absolutely can't bundle certifi.  (I seem to recall it using __file__ when I looked at it some months ago.)  And if one dependency needs to be manually installed, then I'd say the end user can install them all.  I think it's ultimately better not *not* bundle hg-git, so that it can be upgraded when needed.  It's not clear to me that it supports 5.3 yet, though the clone command above completed successfully for me.
Reply all
Reply to author
Forward
0 new messages