Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1.2 and tip

stable thg: handle command line and path properly on Mac OS X

These changes are needed to build a Mac OS X version of TortoiseHg using
py2app.

Changeset 462bb850583c

Parent 19d3c7906d7b

by David Golub

Changes to one file · Browse files at 462bb850583c Showing diff from parent 19d3c7906d7b Diff from another changeset...

Change 1 of 2 Show Entire File thg Stacked
 
11
12
13
 
 
 
 
 
 
 
 
 
14
15
16
 
64
65
66
67
 
68
69
70
 
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
73
74
75
 
76
77
78
79
@@ -11,6 +11,15 @@
 import os  import sys   +argv = sys.argv[1:] +if 'THG_OSX_APP' in os.environ: + # Remove the -psn argument supplied by launchd + argv = argv[1:] + # sys.path as created by py2app doesn't work quite right with demandimport + # Add the explicit path where PyQt4 and other libs are + bundlepath = os.path.dirname(os.path.realname(__file__)) + sys.path.insert(0, os.path.join(bundlepath, 'lib/python2.6/lib-dynload')) +  if hasattr(sys, "frozen"):   if sys.frozen == 'windows_exe' and 'THGDEBUG' in os.environ:   import win32traceutil @@ -64,7 +73,7 @@
  from tortoisehg.hgqt.bugreport import run   from tortoisehg.hgqt.run import qtrun   opts = {} - opts['cmd'] = ' '.join(sys.argv[1:]) + opts['cmd'] = ' '.join(argv)   opts['error'] = '\n' + errmsg + '\n'   opts['nofork'] = True   qtrun(run, ui.ui(), **opts)