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

gdialog: replace all relative imports

Changeset bd25b68575dc

Parent ef9e55c708dd

by Steve Borho

Changes to one file · Browse files at bd25b68575dc Showing diff from parent ef9e55c708dd Diff from another changeset...

Change 1 of 6 Show Entire File hggtk/​gdialog.py Stacked
 
13
14
15
 
16
17
18
 
19
20
21
22
23
 
24
25
26
 
381
382
383
384
385
386
387
388
389
390
391
392
393
394
 
395
396
397
 
425
426
427
428
429
430
431
432
 
490
491
492
493
494
495
496
 
497
498
499
 
512
513
514
515
516
517
518
 
525
526
527
 
528
529
530
 
13
14
15
16
17
18
19
20
21
22
23
24
 
25
26
27
28
 
383
384
385
 
 
386
 
387
388
389
390
391
 
 
392
393
394
395
 
423
424
425
 
 
426
427
428
 
486
487
488
 
489
490
 
491
492
493
494
 
507
508
509
 
510
511
512
 
519
520
521
522
523
524
525
@@ -13,14 +13,16 @@
 import shutil  import tempfile  import gtk +import atexit    from mercurial.node import short  from mercurial import cmdutil, util, ui, hg, commands +from hgext import extdiff    from thgutil.i18n import _  from thgutil import shlib, hglib, paths   -from hggtk import gtklib +from hggtk import gtklib, visdiff, thgconfig    class SimpleMessage(gtklib.MessageDialog):   def run(self): @@ -381,17 +383,13 @@
  return True, textout     def _do_diff(self, patterns, options, modal=False): - import visdiff -   if self.ui.configbool('tortoisehg', 'vdiffnowin'): - from hgext import extdiff   tools = visdiff.readtools(self.ui)   preferred = self.ui.config('tortoisehg', 'vdiff', 'vdiff')   if not preferred or preferred not in tools:   Prompt(_('No visual diff configured'),   _('Please select a visual diff application.'), self).run() - from thgconfig import ConfigDialog - dlg = ConfigDialog(self.repo.root, False) + dlg = thgconfig.ConfigDialog(self.repo.root, False)   dlg.show_all()   dlg.focus_field('tortoisehg.vdiff')   dlg.run() @@ -425,8 +423,6 @@
  self._do_diff(file and [file] or [], self.opts)     def _view_file(self, stat, file, force_left=False): - import atexit -   def cleanup():   shutil.rmtree(self.tmproot)   @@ -490,10 +486,9 @@
  self.ui.config('ui', 'editor') or   os.environ.get('EDITOR', 'vi'))   if os.path.basename(editor) in ('vi', 'vim', 'hgeditor'): - from thgconfig import ConfigDialog   Prompt(_('No visual editor configured'),   _('Please configure a visual editor.'), self).run() - dlg = ConfigDialog(False) + dlg = thgconfig.ConfigDialog(False)   dlg.show_all()   dlg.focus_field('tortoisehg.editor')   dlg.run() @@ -512,7 +507,6 @@
  that isn't available"""   def __init__(self, InitialDir = None, Title = _('Save File'),   Filter = {"All files": "*.*"}, FilterIndex = 1, FileName = ''): - import os.path   if InitialDir == None:   InitialDir = os.path.expanduser("~")   self.InitialDir = InitialDir @@ -525,6 +519,7 @@
  """run the file dialog, either return a file name, or False if   the user aborted the dialog"""   try: + import win32gui, win32con   return self.runWindows()   except ImportError:   return self.runCompatible()