Hackable mercurial based on python 2.7

Angel Ezquerra angel.ezquerra at gmail.com
Mon Jun 25 03:22:29 CDT 2012


On Mon, Jun 25, 2012 at 9:54 AM, Adrian Buehlmann <adrian at cadifra.com> wrote:
> On 2012-06-25 09:04, Angel Ezquerra wrote:
>> On Mon, Jun 25, 2012 at 8:55 AM, Adrian Buehlmann <adrian at cadifra.com> wrote:
>>> On 2012-06-25 07:50, Angel Ezquerra wrote:
>>>> On Mon, Jun 25, 2012 at 12:59 AM, Adrian Buehlmann <adrian at cadifra.com> wrote:
>>>>> On 2012-06-19 08:16, Angel Ezquerra wrote:
>>>>>> Matt,
>>>>>>
>>>>>> Steve has just released the first TortoiseHg and mercurial installer
>>>>>> nightly builds which are based on Python 2.7. I believe the plan is to
>>>>>> only release 2.7 builds from now on (Steve, please correct me if I'm
>>>>>> wrong).
>>>>>>
>>>>>> I wonder, do you have any plans to move the hackable mercurial package
>>>>>> to 2.7 as well?
>>>>>
>>>>> Angel, do you have x64 Windows?
>>>>>
>>>>> I've just uploaded
>>>>>
>>>>>  hg-hackable-x64-python27-ec5ef276077f-1.7z
>>>>>
>>>>> to https://bitbucket.org/abuehl/downloads/downloads
>>>>>
>>>>> It includes my latest hg.exe.
>>>>>
>>>>> It does not include Python, so you need to install that separately
>>>>> (requires Python 2.7).
>>>>
>>>> Adrian,
>>>>
>>>> I guess this needs the x64 version of Python 2.7?
>>>
>>> Yes, it requires a x64 Python installed.
>>>
>>> I use the official
>>> http://www.python.org/ftp/python/2.7.3/python-2.7.3.amd64.msi
>>>
>>> $ python
>>> Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit
>>> (AMD64)] on win32
>>> Type "help", "copyright", "credits" or "license" for more information.
>>>>>>
>>>
>>> Install it "for all users of this computer", if you can (that is, if you
>>> have admin rights on that computer, which I bet you have, since
>>> installing TortoiseHg requires admin rights too for installing. [And no,
>>> I won't help changing that for those whining about it each time I
>>> mention it]).
>>>
>>> Running python-2.7.3.amd64.msi also won't change the PATH. I recommend
>>> you let install it into C:\python27_x64 or something similar (I forgot
>>> what the default is, that the installer proposes. It may already be
>>> that). Double-click python-2.7.3.amd64.msi to start the installation and
>>> then go through the dialogs (accept the UAC admin prompt). It's a
>>> familiar msi installer, like the one of TortoiseHg.
>>>
>>> It will install python27.dll in C:\Windows\system32 if you let install
>>> it "for all users of this computer" (I think that's the default), so it
>>> can be easily found by every program that links to it (like my hg.exe).
>>>
>>> AMD64 is just the 64-bit processor architecture, it doesn't require an
>>> AMD CPU. Intel will do fine (in the past, there was also another 64-bit
>>> architecture, IA64).
>>>
>>>> I'm on 64 bit windows 7,
>>>
>>> Nice. So you have AMD64 architecture hardware (like many people do
>>> today). Start using it! :-)
>>>
>>>> and I have python 2.7 installer, but it is a x32 version
>>>> (actually it is the Enthough's Distribution Python 2.7 version). When
>>>> I run your hg.exe I get:
>>>>
>>>> ImportError: No module named site
>>>
>>> See above.
>>>
>>
>> I'm using a 32 bit python on a 64 bit OS because some important python
>> packages do not work for 64 bit Python yet. Particularly, I don't
>> think there are official packages for numpy, scipy and matplotlib,
>> which I use.
>>
>> Anyway, I'll give this a try, but I will probably need to go back to
>> 32 bit python afterwards.
>
> No, you don't have to. I think you haven't understood the situation.
>
> You can use multiple Python's in parallel, which includes x64 and x86
> versions. It's rather unlikely that istalling python-2.7.3.amd64.msi
> will affect your existing python setup. It won't even touch your PATH
> environment variable. If you want entering "python" in a shell to start
> the CPython x64 python, you'd have to change your PATH yourself.
>
> I have here (from a chat with cmd.exe):
>
>  $ cd
>  C:\
>
>  $ dir Python*
>   Volume in drive C has no label.
>   Volume Serial Number is F80E-0A52
>
>   Directory of C:\
>
>  24.06.2012 22:57    <SYMLINKD>     Python [C:\Python27_x64]
>  26.05.2012 12:08    <DIR>          Python26_x64
>  26.05.2012 12:08    <DIR>          Python26_x86
>  16.06.2012  13:12    <DIR>          Python27_x64
>  16.06.2012  13:12    <DIR>          Python27_x86
>                 0 File(s)              0 bytes
>                 5 Dir(s)  377'188'397'056 bytes free
>
> So I have 4 Pythons installed. The symlink currently points to
> C:\Python27_x64, but that's mostly because I have C:\Python in my PATH
> and I would like to have exactly one "python" in PATH at a time. But I
> can also start the python interpreter with, let's say
> C:\Python26_x86\python.exe.
>
> These four Pythons all live happily together. The x64 versions install
> python26.dll and python27.dll in C:\Windows\system32, the x86 versions
> install python26.dll and python27.dll in C:\Windows\SysWOW64.
>
> The 32-bit and the 64-bit world are perfecty seperated on your Windows 7
> x74. You won't even notice it.
>
> If a 32-bit process tries to look after a dll in C:\Windows\system32,
> Windows 7 x64 will automatically redirect the file access to
> C:\Windows\SysWOW64, the process won't even notice it.
>
> There are other mechanisms like that in place. E.g. similar things
> happen with the registry.


I just gave your hackable mercurial version a quick test and
everything seems to work great now that I have Python 2.7 x64
installed.

Nice!

Angel


More information about the Mercurial-devel mailing list