Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

no path tricks in frozen thg.exe

Changeset a554861105cd

Parent 7dbb95d275d2

by Adrian Buehlmann

Changes to one file · Browse files at a554861105cd Showing diff from parent 7dbb95d275d2 Diff from another changeset...

Change 1 of 1 Show Entire File thg Stacked
 
11
12
13
14
15
16
17
 
 
 
 
 
18
19
20
21
22
23
 
 
 
 
 
24
25
26
 
11
12
13
 
 
 
 
14
15
16
17
18
19
 
 
 
 
 
20
21
22
23
24
25
26
27
@@ -11,16 +11,17 @@
 import os  import sys   -thgpath = os.path.dirname(os.path.realpath(__file__)) -testpath = os.path.join(thgpath, 'tortoisehg') -if os.path.isdir(testpath) and thgpath not in sys.path: - sys.path.insert(0, thgpath) +if not hasattr(sys, "frozen"): + thgpath = os.path.dirname(os.path.realpath(__file__)) + testpath = os.path.join(thgpath, 'tortoisehg') + if os.path.isdir(testpath) and thgpath not in sys.path: + sys.path.insert(0, thgpath)   -if 'HGPATH' in os.environ: - hgpath = os.environ['HGPATH'] - testpath = os.path.join(hgpath, 'mercurial') - if os.path.isdir(testpath) and hgpath not in sys.path: - sys.path.insert(0, hgpath) + if 'HGPATH' in os.environ: + hgpath = os.environ['HGPATH'] + testpath = os.path.join(hgpath, 'mercurial') + if os.path.isdir(testpath) and hgpath not in sys.path: + sys.path.insert(0, hgpath)    from mercurial import ui, util  import cStringIO