Changeset 5e28ed57d229…
Parent 0e2f1e898be5…
by
Changes to one file · Browse files at 5e28ed57d229 Showing diff from parent 0e2f1e898be5 Diff from another changeset...
@@ -15,6 +15,7 @@ import os
import pdb
import sys
+import subprocess
import traceback
import gtk
import gobject
@@ -30,6 +31,12 @@except ImportError:
config_nofork = None
+try:
+ import win32con
+ openflags = win32con.CREATE_NO_WINDOW
+except ImportError:
+ openflags = 0
+
nonrepo_commands = '''userconfig shellconfig clone debugcomplete init
about help version thgstatus serve'''
@@ -95,11 +102,11 @@ args = sys.argv
else:
args = [sys.executable] + sys.argv
- if os.name == 'nt':
- args = ['"%s"' % arg for arg in args]
- env = os.environ.copy()
- env['THG_HGTK_SPAWN'] = '1'
- os.spawnve(os.P_NOWAIT, sys.executable, args, env)
+ os.environ['THG_HGTK_SPAWN'] = '1'
+ subprocess.Popen(args,
+ close_fds=True,
+ creationflags=openflags,
+ shell=True)
sys.exit(0)
def get_list_from_file(filename):
|
Loading...