Changeset 2e318553be7e…
Parent 70b66c1ef08c…
by
Changes to 3 files · Browse files at 2e318553be7e Showing diff from parent 70b66c1ef08c Diff from another changeset...
@@ -4,20 +4,29 @@ #
# Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
#
-# This software may be used and distributed according to the terms
-# of the GNU General Public License, incorporated herein by reference.
+# This software may be used and distributed according to the terms of the
+# GNU General Public License version 2, incorporated herein by reference.
+
+import os, sys
+
+cwd = os.getcwd()
+if cwd in sys.path:
+ # Always remove current directory for Windows exe
+ if hasattr(sys, "frozen"):
+ sys.path.remove(cwd)
+ elif os.path.dirname(__file__) != cwd:
+ sys.path.remove(cwd)
+ sys.path.append(cwd)
# enable importing on demand to reduce startup time
try:
from mercurial import demandimport; demandimport.enable()
except ImportError:
- import sys
sys.stderr.write("abort: couldn't find mercurial libraries in [%s]\n" %
' '.join(sys.path))
sys.stderr.write("(check your install and PYTHONPATH)\n")
sys.exit(-1)
-import sys
import mercurial.util
import mercurial.dispatch
|
|
@@ -1,38 +0,0 @@ - #!/usr/bin/env python
-#
-# mercurial - scalable distributed SCM
-#
-# Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
-#
-# This software may be used and distributed according to the terms of the
-# GNU General Public License version 2, incorporated herein by reference.
-
-import os, sys
-
-cwd = os.getcwd()
-if cwd in sys.path:
- # Always remove current directory for Windows exe
- if hasattr(sys, "frozen"):
- sys.path.remove(cwd)
- elif os.path.dirname(__file__) != cwd:
- sys.path.remove(cwd)
- sys.path.append(cwd)
-
-# enable importing on demand to reduce startup time
-try:
- from mercurial import demandimport; demandimport.enable()
-except ImportError:
- import sys
- sys.stderr.write("abort: couldn't find mercurial libraries in [%s]\n" %
- ' '.join(sys.path))
- sys.stderr.write("(check your install and PYTHONPATH)\n")
- sys.exit(-1)
-
-import sys
-import mercurial.util
-import mercurial.dispatch
-
-for fp in (sys.stdin, sys.stdout, sys.stderr):
- mercurial.util.set_binary(fp)
-
-mercurial.dispatch.run()
|
@@ -98,7 +98,7 @@ }
}
extra['console'] = [
- {'script':'../build-hg/hg', 'icon_resources':[(0,'icons/hg.ico')]},
+ {'script':'contrib/hg', 'icon_resources':[(0,'icons/hg.ico')]},
{'script':'hgtk', 'icon_resources':[(0,'icons/thg_logo.ico')]}
]
extra['windows'] = [
|
Loading...