equal
deleted
inserted
replaced
42 if extra_path is not None: |
42 if extra_path is not None: |
43 # extensions and hooks expect a working python environment |
43 # extensions and hooks expect a working python environment |
44 # We do not prepend the values because the Mercurial library wants to be in |
44 # We do not prepend the values because the Mercurial library wants to be in |
45 # the front of the sys.path to avoid picking up other installations. |
45 # the front of the sys.path to avoid picking up other installations. |
46 sys.path.extend(extra_path.split(os.pathsep)) |
46 sys.path.extend(extra_path.split(os.pathsep)) |
|
47 # Add user site to sys.path to load extensions without the full path |
|
48 if os.name == 'nt': |
|
49 vi = sys.version_info |
|
50 sys.path.append( |
|
51 os.path.join( |
|
52 os.environ['APPDATA'], |
|
53 'Python', |
|
54 'Python%d%d' % (vi[0], vi[1]), |
|
55 'site-packages', |
|
56 ) |
|
57 ) |
47 import hgdemandimport; |
58 import hgdemandimport; |
48 hgdemandimport.enable(); |
59 hgdemandimport.enable(); |
49 from mercurial import dispatch; |
60 from mercurial import dispatch; |
50 dispatch.run(); |
61 dispatch.run(); |
51 """ |
62 """ |