Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.1, 1.1.1, and 1.1.2

hgtk: spawn background process when using --repository

When forking, relative paths are a problem since we have switched to
the target repository directory already, and will do so again after
forking. This is solved by switching back to the original working
directory prior to spawning the new process.

Changeset 6bb085aaeda8

Parent 8267058724ab

by Sune Foldager

Changes to one file · Browse files at 6bb085aaeda8 Showing diff from parent 8267058724ab Diff from another changeset...

 
87
88
89
 
90
91
92
93
 
94
95
96
 
104
105
106
 
107
108
109
 
87
88
89
90
91
92
 
 
93
94
95
96
 
104
105
106
107
108
109
110
@@ -87,10 +87,10 @@
  else:   gtkrun(run, u, **opts)   +origwdir = os.getcwd()  def portable_fork(ui, opts):   if 'THG_HGTK_SPAWN' in os.environ or ( - not opts.get('fork') and ( - opts.get('nofork') or opts.get('repository'))): + not opts.get('fork') and opts.get('nofork')):   return   elif ui.configbool('tortoisehg', 'hgtkfork', None) is not None:   if not ui.configbool('tortoisehg', 'hgtkfork'): @@ -104,6 +104,7 @@
  args = [sys.executable] + sys.argv   os.environ['THG_HGTK_SPAWN'] = '1'   cmdline = subprocess.list2cmdline(args) + os.chdir(origwdir)   subprocess.Popen(cmdline,   close_fds=True,   creationflags=openflags,