Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 10239:8e4be44a676f
Find right hg command for detached process
On Windows, Mercurial can be run from the python script of from a frozen
executable. In the first case, we have to call the python interpreter since the
script is not executable. Frozen executable can be called directly.
Fix 3/3 for issue421
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 21:11:58 +0100 |
parents | e22695b4472f |
children | 3af4b39afe2a |
comparison
equal
deleted
inserted
replaced
10238:e22695b4472f | 10239:8e4be44a676f |
---|---|
570 # Signal child process startup with file removal | 570 # Signal child process startup with file removal |
571 lockfd, lockpath = tempfile.mkstemp(prefix='hg-service-') | 571 lockfd, lockpath = tempfile.mkstemp(prefix='hg-service-') |
572 os.close(lockfd) | 572 os.close(lockfd) |
573 try: | 573 try: |
574 if not runargs: | 574 if not runargs: |
575 runargs = sys.argv[:] | 575 runargs = util.hgcmd() + sys.argv[1:] |
576 runargs.append('--daemon-pipefds=%s' % lockpath) | 576 runargs.append('--daemon-pipefds=%s' % lockpath) |
577 # Don't pass --cwd to the child process, because we've already | 577 # Don't pass --cwd to the child process, because we've already |
578 # changed directory. | 578 # changed directory. |
579 for i in xrange(1,len(runargs)): | 579 for i in xrange(1,len(runargs)): |
580 if runargs[i].startswith('--cwd='): | 580 if runargs[i].startswith('--cwd='): |