The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,225 other subscribers

Archive for the ‘Mercurial/Hg’ Category

Fixing hg.exe “ImportError: DLL load failed: %1 is not a valid Win32 application.”

Posted by jpluimers on 2021/07/21

If you get the below error when running hg.exe, then you are mixing a 64-bit Mercurial with 32-bit dependencies:

C:\>hg --version
Traceback (most recent call last):
  File "hg", line 43, in 
  File "hgdemandimport\demandimportpy2.pyc", line 150, in __getattr__
  File "hgdemandimport\demandimportpy2.pyc", line 94, in _load
  File "hgdemandimport\demandimportpy2.pyc", line 43, in _hgextimport
  File "mercurial\dispatch.pyc", line 22, in 
  File "hgdemandimport\demandimportpy2.pyc", line 248, in _demandimport
  File "hgdemandimport\demandimportpy2.pyc", line 43, in _hgextimport
  File "mercurial\i18n.pyc", line 28, in 
  File "hgdemandimport\demandimportpy2.pyc", line 150, in __getattr__
  File "hgdemandimport\demandimportpy2.pyc", line 94, in _load
  File "hgdemandimport\demandimportpy2.pyc", line 43, in _hgextimport
  File "mercurial\encoding.pyc", line 24, in 
  File "mercurial\policy.pyc", line 101, in importmod
  File "mercurial\policy.pyc", line 63, in _importfrom
  File "hgdemandimport\demandimportpy2.pyc", line 164, in __doc__
  File "hgdemandimport\demandimportpy2.pyc", line 94, in _load
  File "hgdemandimport\demandimportpy2.pyc", line 43, in _hgextimport
  File "mercurial\cext\parsers.pyc", line 12, in 
  File "mercurial\cext\parsers.pyc", line 10, in __load
ImportError: DLL load failed: %1 is geen geldige Win32-toepassing.

The equivalent English error is [WayBack] ImportError: DLL load failed: %1 is not a valid Win32 application.” – Google Search.

The problem is the bitness of hg.exe: [WayBack] python – Error while installing Mercurial on IIS7 64bit: “DLL Load Failed: %1 is not a valid Win32 application” – Stack Overflow

You can quickly figure out the bitness of hg.exe:

C:\>where hg
C:\Program Files\Mercurial\hg.exe

C:\>sigcheck "C:\Program Files\Mercurial\hg.exe"

Sigcheck v2.72 - File version and signature viewer
Copyright (C) 2004-2019 Mark Russinovich
Sysinternals - www.sysinternals.com

c:\program files\mercurial\hg.exe:
        Verified:       Unsigned
        Link date:      17:49 9-7-2019
        Publisher:      n/a
        Company:        n/a
        Description:    Fast scalable distributed SCM (revision control, version control) system
        Product:        mercurial
        Prod version:   5.0.2
        File version:   5.0.2
        MachineType:    64-bit

Forcing x86 of Mercurial

Since I use chocolatey for most my installs, I forced x86 the Chocolatey way:

So after these:

choco uninstall --yes hg
choco install --yes --force86 hg

I got this signature check:

C:\>sigcheck "C:\Program Files (x86)\Mercurial\hg.exe"

Sigcheck v2.72 - File version and signature viewer
Copyright (C) 2004-2019 Mark Russinovich
Sysinternals - www.sysinternals.com

c:\program files (x86)\mercurial\hg.exe:
        Verified:       Unsigned
        Link date:      17:50 9-7-2019
        Publisher:      n/a
        Company:        n/a
        Description:    Fast scalable distributed SCM (revision control, version control) system
        Product:        mercurial
        Prod version:   5.0.2
        File version:   5.0.2
        MachineType:    32-bit

–jeroen

Posted in Development, DVCS - Distributed Version Control, Encoding, Mercurial/Hg, Python, Scripting, Software Development, Source Code Management | Leave a Comment »

How to Convert a Mercurial Repository to Git on Windows

Posted by jpluimers on 2021/03/30

For my link archive: [WayBack] How to Convert a Mercurial Repository to Git on Windows.

Let’s see how this maps to MacOS or Linux…

It is based on hg-git:

Other solutions are based on  [WayBack]fast-export or [WayBack] gitifyhg.

If I am going to do this beyond a one-off conversion, I need to figure out their differences.

Related:

 

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Software Development, Source Code Management | Leave a Comment »

A choco install list

Posted by jpluimers on 2021/02/03

Sometimes I forget the choco install mnemonics for various tools, so here is a small list below.

Of course you have to start with an administrative command prompt, and have a basic Chocolatey Installation in place.

If you want to clean cruft:

choco install --yes choco-cleaner

Basic install:

choco install --yes 7zip
choco install --yes everything
choco install --yes notepadplusplus
choco install --yes beyondcompare
choco install --yes git.install --params "/GitAndUnixToolsOnPath /NoGitLfs /SChannel /NoAutoCrlf /WindowsTerminal"
choco install --yes hg
choco install --yes sourcetree
choco install --yes sysinternals

For VMs (pic one):

choco install --yes vmware-tools
choco install --yes virtio-drivers

For browsing (not sure yet about Chrome as that one has a non-admin installer as well):

choco install --yes firefox

For file transfer (though be aware that some versions of Filezilla contained adware):

choco install --yes filezilla
choco install --yes winscp

For coding:

choco install --yes vscode
choco install --yes atom

For SQL server:

choco install --yes sql-server-management-studio

For web development / power user:

choco install --yes fiddler

For SOAP and REST:

choco install --yes soapui

If you don’t like manually downloading SequoiaView at gist.github.com/jpluimers/b0df9c2dba49010454ca6df406bc5f3d (e8efd031d667de8a1808d6ea73548d77949e7864.zip):

choco install --yes windirstat

For drawing, image manipulation (paint.net last, as it needs a UI action):

choco install --yes gimp
choco install --yes imagemagick
choco install --yes paint.net

For ISO image mounting in pre Windows 10:

choco install --yes wincdemu

For hard disk management:

choco install --yes hdtune
choco install --yes seatools
choco install --yes speedfan

For Fujitsu ScanSnap scanners (not sure yet this includes PDF support):

choco install --yes scansnapmanager

–jeroen

Posted in 7zip, atom editor, Beyond Compare, Chocolatey, Compression, Database Development, Development, DVCS - Distributed Version Control, Everything by VoidTools, Fiddler, Firefox, Fujitsu ScanSnap, git, Hardware, Mercurial/Hg, Power User, Scanners, SOAP/WebServices, Software Development, Source Code Management, SQL Server, SSMS SQL Server Management Studio, SysInternals, Text Editors, Versioning, Virtualization, VMware, VMware ESXi, vscode Visual Studio Code, Web Browsers, Web Development, Windows | Leave a Comment »

Sunsetting Mercurial support in Bitbucket – Bitbucket

Posted by jpluimers on 2020/01/30

February 1st, the start commences of Sunsetting Mercurial support in Bitbucket – Bitbucket [WayBack]. Starting June 1st, only git is supported by Bitbucket, despite them having started with and focused mainly Mercurial at first.

Here are the major dates of the sunset:

  • February 1, 2020: users will no longer be able to create new Mercurial repositories
  • June 1, 2020: users will not be able to use Mercurial features in Bitbucket or via its API and all Mercurial repositories will be removed.

All current Mercurial functionality in Bitbucket will be available through May 31, 2020.

So by now you should have started migrating from Mercurial to git, probably away from BitBucket.

Read the rest of this entry »

Posted in BitBucket, Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Software Development, Source Code Management | Leave a Comment »

Unorthodocs: Abandon your DVCS and Return to Sanity – bitquabit

Posted by jpluimers on 2019/11/21

Some interesting thoughts on DVCS: [WayBackUnorthodocs: Abandon your DVCS and Return to Sanity – bitquabit

Besides the very good point it raises about DVCS (Git, Mercurial and most other DVCSes treat the whole state of the repository as the atom) it also indicates quite a few shortcomings:

  • most people hardly ever need the full history to be off-line
  • having the full history means repositories get huge in size, including your off-line clone
  • pseudo-solutions for huge repository sizes – like git-LFS or git-annex – are a no-go because now you loose atomicity
  • huge repositories in file or commit counts make them slow, especially when the trees are deep
  • splitting up repositories isn’t a good idea either because again: you loose atomicity
  • all DVCS are hard, not just git, because they are distributed and full of features
  • the workflow for submitting pull requests is quite a bit longer than submitting a patch, even though merging in a DVCS can be hard too (despite atomicity which does help a lot for DVCS systems)

I see many other advantages of DVCS systems (for instance that you only need to locally have the branches you are interested in, way better tooling for DVCS systems, ditto for sites hosting DVCS), but it always a good thing to know the weak spots of what you are working with.

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Software Development, Source Code Management | Leave a Comment »

 
%d bloggers like this: