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

thg: run build_qt before importing mercurial to resolve ambiguous setup.py

It seems that on some Windows configurations (such as mine), importing setup
looks for setup.py in Mercurial itself before TortoiseHg. This makes it barf
when we try to import build_qt.

Changeset 5b769293de40

Parent 6f851b3634b3

by James McKay

Changes to one file · Browse files at 5b769293de40 Showing diff from parent 6f851b3634b3 Diff from another changeset...

Change 1 of 1 Show Entire File thg Stacked
 
17
18
19
 
 
 
 
 
 
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
 
 
 
 
 
32
33
34
@@ -17,18 +17,18 @@
  if os.path.isdir(testpath) and thgpath not in sys.path:   sys.path.insert(0, thgpath)   + # compile .ui and .qrc for in-place use + if os.path.exists(os.path.join(os.path.dirname(__file__), 'setup.py')): + from distutils.dist import Distribution + from setup import build_qt + build_qt(Distribution()).run() +   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)   - # compile .ui and .qrc for in-place use - if os.path.exists(os.path.join(os.path.dirname(__file__), 'setup.py')): - from distutils.dist import Distribution - from setup import build_qt - build_qt(Distribution()).run() -  from mercurial import demandimport  demandimport.ignore.append('win32com.shell')  demandimport.ignore.append('tortoisehg.util.config')