Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

hgtk: remove cruft

Changeset fda9e904f137

Parent 806416afa1c6

by Steve Borho

Changes to 2 files · Browse files at fda9e904f137 Showing diff from parent 806416afa1c6 Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​hgtk.py Stacked
 
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
 
183
184
185
 
11
12
13
 
 
 
 
 
 
 
 
 
14
15
16
 
141
142
143
 
 
 
 
 
 
144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
146
147
148
@@ -11,15 +11,6 @@
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  '''   -# The recommended usage is to symlink this file into your path. -# alternatively, you can change this line or set TORTOISEHG_PATH -tortoisehg_dir = '~/tools/tortoisehg-dev' - -import pygtk -pygtk.require('2.0') -import gtk - -from mercurial import demandimport; demandimport.enable()  from mercurial.i18n import _  from mercurial import hg, util, fancyopts, commands, cmdutil  import pdb @@ -150,36 +141,8 @@
  # Py2exe environment   thgdir = os.path.dirname(sys.executable)   os.environ['THG_ICON_PATH'] = os.path.join(thgdir, 'icons') - else: - # Add TortoiseHg to python path - path = os.environ.get('TORTOISEHG_PATH') or tortoisehg_dir - norm = os.path.normpath(os.path.expanduser(path)) - if norm not in sys.path: - sys.path.insert(0, norm)   - try: - # assuming TortoiseHg source layout, with hgtk in contrib - path = os.path.dirname(os.path.realpath(__file__)) - except NameError: - # __file__ not available in pdb mode - path = os.path.dirname(sys.argv[0]) - norm = os.path.normpath(os.path.join(path, '..')) - if norm not in sys.path: - sys.path.append(norm) - - try: - from hggtk import hglib - except ImportError, inst: - m = str(inst).split()[-1] - if m in "hglib hggtk".split(): - # fix "tortoisehg_dir" at the top of this script, or ... - raise util.Abort(_('Please set TORTOISEHG_PATH to location ' - 'of your tortoisehg repository')) - else: - raise util.Abort(_('could not import module %s!\n' % m)) - except: - raise - + import hglib   path = hglib.rootpath(os.getcwd())   if path:   try:
Change 1 of 2 Show Entire File hgtk Stacked
 
6
7
8
9
10
11
12
13
14
15
16
17
 
48
49
50
51
 
6
7
8
 
 
 
 
 
 
9
10
11
 
42
43
44
 
@@ -6,12 +6,6 @@
 # Copyright (C) 2008 TK Soh <teekaysoh@gmail.com>  #   -shortlicense = '''\ -Copyright (C) 2009 Steve Borho <steve@borho.org>. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -''' -  import pygtk  pygtk.require('2.0')  import gtk @@ -48,4 +42,3 @@
  sys.exit(-1)    sys.exit(hggtk.hgtk.dispatch(sys.argv[1:])) -