diff --git a/hgext/logtoprocess.py b/hgext/logtoprocess.py --- a/hgext/logtoprocess.py +++ b/hgext/logtoprocess.py @@ -59,11 +59,19 @@ _creationflags = DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP def runshellcommand(script, env, ui): + + createconsole = ui.configbool("logtoprocess", "windows-create-console") + + if createconsole: + creationflags = subprocess.CREATE_NEW_CONSOLE + else: + creationflags = _creationflags + # we can't use close_fds *and* redirect stdin. I'm not sure that we # need to because the detached process has no console connection. subprocess.Popen( script, shell=True, env=env, close_fds=True, - creationflags=_creationflags) + creationflags=creationflags) else: def runshellcommand(script, env, ui): # double-fork to completely detach from the parent process diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -569,6 +569,9 @@ coreconfigitem('logtoprocess', 'uiblocked', default=None, ) +coreconfigitem('logtoprocess', 'windows-create-console', + default=False, +) coreconfigitem('merge', 'checkunknown', default='abort', )