Issue #1949 resolved

portable_fork fails with WindowsError 2 The system cannot find the file specified

Dale Herrig
created an issue

I installed tortoisehg-2.4.1-hg-2.2.2-x64.msi on my window 64 machine. When I try to launch the TortiseHG workbench, I get the below.

I unistalled and installed again but still get the same problem.

** Mercurial version (2.2.2).  TortoiseHg version (2.4.1)
** Command: 
** CWD: C:\Windows\system32
** Encoding: cp1252
** Extensions loaded: 
** Python version: 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)]
** Windows version: (6, 1, 7601, 2, 'Service Pack 1')
** Processor architecture: x64
** Qt-4.7.4 PyQt-4.8.6
Traceback (most recent call last):
  File "tortoisehg\hgqt\run.pyo", line 56, in dispatch
  File "tortoisehg\hgqt\run.pyo", line 247, in _runcatch
  File "tortoisehg\hgqt\run.pyo", line 323, in runcommand
  File "tortoisehg\hgqt\run.pyo", line 374, in _runcommand
  File "tortoisehg\hgqt\run.pyo", line 328, in checkargs
  File "tortoisehg\hgqt\run.pyo", line 322, in <lambda>
  File "mercurial\util.pyo", line 463, in check
  File "tortoisehg\hgqt\run.pyo", line 758, in log
  File "tortoisehg\hgqt\run.pyo", line 520, in __call__
  File "tortoisehg\hgqt\run.pyo", line 95, in portable_fork
  File "tortoisehg\hgqt\run.pyo", line 111, in portable_start_fork
  File "subprocess.pyo", line 623, in __init__
  File "subprocess.pyo", line 833, in _execute_child
WindowsError: [Error 2] The system cannot find the file specified

Comments (16)

  1. Yuya Nishihara
    • changed status to open

    Maybe it won't help, but...

    • Try to restart the machine after install
    • What happens if open "C:\Program Files\TortoiseHg" by Explorer and double-click "thgw.exe" ?
  2. Yuya Nishihara

    Yeah, very strange... I cannot test the 64-bit version, but 32-bit one started with no error.

    Just in case, could you try after virus scanner disabled?

    FWIW, as a workaround, probably you can start TortoiseHg from Explorer's context menu, or from command-line "thgw.exe --nofork".

  3. Dale Herrig reporter

    (Reply via dale...@osi.com):

    interesting from the command line "thgw.exe" did not work but "thgw.exe --nofork" did

    -Dale

    On Sun, Jun 10, 2012 at 8:15 AM, Yuya Nishihara <issues-reply@bitbucket.org>wrote:

  4. Yuya Nishihara

    "--nofork" skips portable_fork() function, so it should work.

    I can get the same error with invalid ComSpec environment variable, but it wouldn't normally happen.

  5. Franco Melandri

    I Have the same problem on windows 7 64bit. If I disable the guifork using the False flag the application start but after taht I cannot use no one tools like Notepad++ or Beuyond compare. The error is always "Tool launch failure" xxx [Error 2] The system cannot find the file specified"

  6. Log in to comment