Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

Make forking configurable in config.py and disable it by default on Posix.

The new default value can be overruled with the config setting
tortoisehg.hgtkfork = 1.

Unix has shell commands for running processes in the background, so the
built-in forking support isn't necessary. Very few Unix gui commands without
MDI or tabs forks, so hgtk will be more predictable and tradition-compliant if
it also doesn't fork.

Changeset 0b4e5b9eed32

Parent b51c60a7f6e0

by Mads Kiilerich

Changes to 3 files · Browse files at 0b4e5b9eed32 Showing diff from parent b51c60a7f6e0 Diff from another changeset...

 
44
45
46
 
47
48
49
 
44
45
46
47
48
49
50
@@ -44,6 +44,7 @@
 license_path = "%{_docdir}/%{name}-%{version}/COPYING.txt"  locale_path = "%{_datadir}/locale"  icon_path = "%{_datadir}/pixmaps/tortoisehg/icons" +nofork = True  EOT    %build
Change 1 of 1 Show Entire File setup.py Stacked
 
145
146
147
 
148
149
150
 
145
146
147
148
149
150
151
@@ -145,6 +145,7 @@
  f.write('license_path = "/usr/share/doc/tortoisehg/Copying.txt.gz"\n')   f.write('locale_path = "/usr/share/locale"\n')   f.write('icon_path = "/usr/share/pixmaps/tortoisehg/icons"\n') + f.write('nofork = True\n')   f.close()     return _scripts, _packages, _data_files, _extra
 
25
26
27
 
 
 
 
28
29
30
 
72
73
74
75
 
 
76
77
78
79
 
 
 
 
80
81
82
 
25
26
27
28
29
30
31
32
33
34
 
76
77
78
 
79
80
81
 
 
 
82
83
84
85
86
87
88
@@ -25,6 +25,10 @@
 from tortoisehg.util.i18n import agettext as _  from tortoisehg.util import hglib, paths, shlib  from tortoisehg.util import version as thgversion +try: + from tortoisehg.util.config import nofork as config_nofork +except ImportError: + config_nofork = None    nonrepo_commands = '''userconfig clone debugcomplete init about help  version thgstatus serve''' @@ -72,11 +76,13 @@
  gtkrun(run, u, **opts)    def portable_fork(ui, opts): - if 'THG_HGTK_SPAWN' in os.environ: + if 'THG_HGTK_SPAWN' in os.environ or \ + opts.get('nofork') or opts.get('repository'):   return - if opts.get('nofork') or opts.get('repository'): - return - if not ui.configbool('tortoisehg', 'hgtkfork', True): + elif ui.configbool('tortoisehg', 'hgtkfork', None) is not None: + if not ui.configbool('tortoisehg', 'hgtkfork'): + return + elif config_nofork:   return   # Spawn background process and exit   if hasattr(sys, "frozen"):