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

eliminate hgqt/hgviewlib/qt4 subdirectory

Changeset 9c0e71b66a30

Parent dcfd73d6a5a1

by Adrian Buehlmann

Changes to 43 files · Browse files at 9c0e71b66a30 Showing diff from parent dcfd73d6a5a1 Diff from another changeset...

Show Entire File tortoisehg/​hgqt/​hgviewlib/​__init__.py Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/__init__.py
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​blockmatcher.py Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/blockmatcher.py
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​filediffviewer.ui Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/filediffviewer.ui
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​fileviewer.ui Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/fileviewer.ui
(No changes)
Change 1 of 1 Show Entire File tortoisehg/​hgqt/​hgviewlib/​helpviewer.py Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/helpviewer.py
 
14
15
16
17
18
 
 
19
20
21
 
14
15
16
 
 
17
18
19
20
21
@@ -14,8 +14,8 @@
   from PyQt4 import QtCore, QtGui, Qsci   -from tortoisehg.hgqt.hgviewlib.qt4 import icon as geticon -from tortoisehg.hgqt.hgviewlib.qt4.hgdialogmixin import HgDialogMixin +from tortoisehg.hgqt.hgviewlib import icon as geticon +from tortoisehg.hgqt.hgviewlib.hgdialogmixin import HgDialogMixin  from tortoisehg.hgqt.hgviewlib.hgviewhelp import help_msg, get_options_helpmsg    Qt = QtCore.Qt
Show Entire File tortoisehg/​hgqt/​hgviewlib/​helpviewer.ui Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/helpviewer.ui
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​helpviewer_ui.py Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/helpviewer_ui.py
(No changes)
Change 1 of 2 Show Changes Only tortoisehg/​hgqt/​hgviewlib/​hgdialogmixin.py Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/hgdialogmixin.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
 
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
 
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
 # -*- coding: utf-8 -*-  # Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE).  # http://www.logilab.fr/ -- mailto:contact@logilab.fr  #  # This program is free software; you can redistribute it and/or modify it under  # the terms of the GNU General Public License as published by the Free Software  # Foundation; either version 2 of the License, or (at your option) any later  # version.  #  # This program is distributed in the hope that it will be useful, but WITHOUT  # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS  # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.  #  # You should have received a copy of the GNU General Public License along with  # this program; if not, write to the Free Software Foundation, Inc.,  # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.    #  # make sur the Qt rc files are converted into python modules, then load them  # this must be done BEFORE other hgview qt4 modules are loaded.  import os  import os.path as osp  import sys    from PyQt4 import QtCore  from PyQt4 import QtGui, uic  connect = QtCore.QObject.connect  SIGNAL = QtCore.SIGNAL  Qt = QtCore.Qt    from tortoisehg.hgqt.hgviewlib.config import HgConfig -from tortoisehg.hgqt.hgviewlib.qt4 import should_rebuild +from tortoisehg.hgqt.hgviewlib import should_rebuild    class HgDialogMixin(object):   """   Mixin for QDialogs defined from a .ui file, wich automates the   setup of the UI from the ui file, and the loading of user   preferences.   The main class must define a '_ui_file' class attribute.   """   def __init__(self):   # self.repo must be defined in actual class before calling __init__   assert self.repo is not None   self.load_config()     _path = osp.dirname(__file__)   uifile = osp.join(_path, self._uifile)   pyfile = uifile.replace(".ui", "_ui.py")   if should_rebuild(uifile, pyfile):   os.system('pyuic4 %s -o %s' % (uifile, pyfile))   try:   modname = osp.splitext(osp.basename(uifile))[0] + "_ui" - modname = "hgviewlib.qt4.%s" % modname + modname = "hgviewlib.%s" % modname   mod = __import__(modname, fromlist=['*'])   classnames = [x for x in dir(mod) if x.startswith('Ui_')]   if len(classnames) == 1:   ui_class = getattr(mod, classnames[0])   elif 'Ui_MainWindow' in classnames:   ui_class = getattr(mod, 'Ui_MainWindow')   else:   raise ValueError("Can't determine which main class to use in %s" % modname)   except ImportError:   ui_class, base_class = uic.loadUiType(uifile)     if ui_class not in self.__class__.__bases__:   # hacking by adding the form class from ui file or pyuic4   # generated module because we cannot use metaclass here,   # due to "QObject" not being a subclass of "object"   self.__class__.__bases__ = self.__class__.__bases__ + (ui_class,)   self.setupUi(self)   self.load_ui()   self.disab_shortcuts = []     def load_ui(self):   # we explicitely create a QShortcut so we can disable it   # when a "helper context toolbar" is activated (which can be   # closed hitting the Esc shortcut)   self.esc_shortcut = QtGui.QShortcut(self)   self.esc_shortcut.setKey(Qt.Key_Escape)   connect(self.esc_shortcut, SIGNAL('activated()'),   self.maybeClose)   self._quickbars = []     def attachQuickBar(self, qbar):   qbar.setParent(self)   self._quickbars.append(qbar)   connect(qbar, SIGNAL('escShortcutDisabled(bool)'),   self.setShortcutsEnabled)   self.addToolBar(Qt.BottomToolBarArea, qbar)   connect(qbar, SIGNAL('visible'),   self.ensureOneQuickBar)     def setShortcutsEnabled(self, enabled=True):   for sh in self.disab_shortcuts:   sh.setEnabled(enabled)     def ensureOneQuickBar(self):   tb = self.sender()   for w in self._quickbars:   if w is not tb:   w.hide()     def maybeClose(self):   for w in self._quickbars:   if w.isVisible():   w.cancel()   break   else:   self.close()     def load_config(self):   cfg = HgConfig(self.repo.ui)   fontstr = cfg.getFont()   font = QtGui.QFont()   try:   if not font.fromString(fontstr):   raise Exception   except:   print "bad font name '%s'" % fontstr   font.setFamily("Monospace")   font.setFixedPitch(True)   font.setPointSize(10)   self._font = font     self.rowheight = cfg.getRowHeight()   self.users, self.aliases = cfg.getUsers()   return cfg     def accept(self):   self.close()   def reject(self):   self.close()    
Change 1 of 2 Show Entire File tortoisehg/​hgqt/​hgviewlib/​hgfiledialog.py Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/hgfiledialog.py
 
30
31
32
33
34
35
36
37
38
 
 
 
 
 
 
39
40
41
 
104
105
106
107
 
108
109
110
 
30
31
32
 
 
 
 
 
 
33
34
35
36
37
38
39
40
41
 
104
105
106
 
107
108
109
110
@@ -30,12 +30,12 @@
   from tortoisehg.util.util import tounicode, rootpath   -from tortoisehg.hgqt.hgviewlib.qt4 import icon as geticon -from tortoisehg.hgqt.hgviewlib.qt4.hgdialogmixin import HgDialogMixin -from tortoisehg.hgqt.hgviewlib.qt4.hgrepomodel import FileRevModel -from tortoisehg.hgqt.hgviewlib.qt4.blockmatcher import BlockList, BlockMatch -from tortoisehg.hgqt.hgviewlib.qt4.lexers import get_lexer -from tortoisehg.hgqt.hgviewlib.qt4.quickbar import FindInGraphlogQuickBar +from tortoisehg.hgqt.hgviewlib import icon as geticon +from tortoisehg.hgqt.hgviewlib.hgdialogmixin import HgDialogMixin +from tortoisehg.hgqt.hgviewlib.hgrepomodel import FileRevModel +from tortoisehg.hgqt.hgviewlib.blockmatcher import BlockList, BlockMatch +from tortoisehg.hgqt.hgviewlib.lexers import get_lexer +from tortoisehg.hgqt.hgviewlib.quickbar import FindInGraphlogQuickBar    connect = QtCore.QObject.connect  disconnect = QtCore.QObject.disconnect @@ -104,7 +104,7 @@
  """   if self.repoviewer is None:   # prevent recursive import - from hgviewlib.qt4.hgrepoviewer import HgRepoViewer + from hgviewlib.hgrepoviewer import HgRepoViewer   self.repoviewer = HgRepoViewer(self.repo)   self.repoviewer.goto(rev)   self.repoviewer.show()
Change 1 of 1 Show Entire File tortoisehg/​hgqt/​hgviewlib/​hgfileview.py Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/hgfileview.py
 
37
38
39
40
41
42
43
44
45
 
 
 
 
 
 
46
47
48
 
37
38
39
 
 
 
 
 
 
40
41
42
43
44
45
46
47
48
@@ -37,12 +37,12 @@
 from tortoisehg.hgqt.hgviewlib.decorators import timeit  from tortoisehg.hgqt.hgviewlib.config import HgConfig   -from tortoisehg.hgqt.hgviewlib.qt4 import icon as geticon -from tortoisehg.hgqt.hgviewlib.qt4.hgfiledialog import FileViewer, FileDiffViewer -from tortoisehg.hgqt.hgviewlib.qt4.hgmanifestdialog import ManifestViewer -from tortoisehg.hgqt.hgviewlib.qt4.quickbar import QuickBar -from tortoisehg.hgqt.hgviewlib.qt4.lexers import get_lexer -from tortoisehg.hgqt.hgviewlib.qt4.blockmatcher import BlockList +from tortoisehg.hgqt.hgviewlib import icon as geticon +from tortoisehg.hgqt.hgviewlib.hgfiledialog import FileViewer, FileDiffViewer +from tortoisehg.hgqt.hgviewlib.hgmanifestdialog import ManifestViewer +from tortoisehg.hgqt.hgviewlib.quickbar import QuickBar +from tortoisehg.hgqt.hgviewlib.lexers import get_lexer +from tortoisehg.hgqt.hgviewlib.blockmatcher import BlockList    qsci = Qsci.QsciScintilla  
Change 1 of 1 Show Entire File tortoisehg/​hgqt/​hgviewlib/​hgmanifestdialog.py Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/hgmanifestdialog.py
 
29
30
31
32
33
34
35
 
 
 
 
36
37
38
 
29
30
31
 
 
 
 
32
33
34
35
36
37
38
@@ -29,10 +29,10 @@
   from tortoisehg.util.util import tounicode   -from tortoisehg.hgqt.hgviewlib.qt4 import icon as geticon -from tortoisehg.hgqt.hgviewlib.qt4.hgdialogmixin import HgDialogMixin -from tortoisehg.hgqt.hgviewlib.qt4.hgrepomodel import ManifestModel -from tortoisehg.hgqt.hgviewlib.qt4.lexers import get_lexer +from tortoisehg.hgqt.hgviewlib import icon as geticon +from tortoisehg.hgqt.hgviewlib.hgdialogmixin import HgDialogMixin +from tortoisehg.hgqt.hgviewlib.hgrepomodel import ManifestModel +from tortoisehg.hgqt.hgviewlib.lexers import get_lexer    connect = QtCore.QObject.connect  disconnect = QtCore.QObject.disconnect
Show Entire File tortoisehg/​hgqt/​hgviewlib/​hgqv.qrc Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/hgqv.qrc
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​hgqv.ui Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/hgqv.ui
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​hgqv_rc.py Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/hgqv_rc.py
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​hgqv_ui.py Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/hgqv_ui.py
(No changes)
Change 1 of 1 Show Entire File tortoisehg/​hgqt/​hgviewlib/​hgrepomodel.py Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/hgrepomodel.py
 
31
32
33
34
 
35
36
37
 
31
32
33
 
34
35
36
37
@@ -31,7 +31,7 @@
 from tortoisehg.hgqt.hgviewlib.hggraph import Graph, ismerge, diff as revdiff  from tortoisehg.hgqt.hgviewlib.hggraph import revision_grapher, filelog_grapher  from tortoisehg.hgqt.hgviewlib.config import HgConfig -from tortoisehg.hgqt.hgviewlib.qt4 import icon as geticon +from tortoisehg.hgqt.hgviewlib import icon as geticon  from tortoisehg.hgqt.hgviewlib.decorators import timeit    from PyQt4 import QtCore, QtGui
Change 1 of 1 Show Entire File tortoisehg/​hgqt/​hgviewlib/​hgrepoview.py Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/hgrepoview.py
 
34
35
36
37
38
39
 
 
 
40
41
42
 
34
35
36
 
 
 
37
38
39
40
41
42
@@ -34,9 +34,9 @@
   from tortoisehg.hgqt.hgviewlib.decorators import timeit  from tortoisehg.hgqt.hgviewlib.config import HgConfig -from tortoisehg.hgqt.hgviewlib.qt4 import icon as geticon -from tortoisehg.hgqt.hgviewlib.qt4.hgmanifestdialog import ManifestViewer -from tortoisehg.hgqt.hgviewlib.qt4.quickbar import QuickBar +from tortoisehg.hgqt.hgviewlib import icon as geticon +from tortoisehg.hgqt.hgviewlib.hgmanifestdialog import ManifestViewer +from tortoisehg.hgqt.hgviewlib.quickbar import QuickBar    class GotoQuickBar(QuickBar):   def __init__(self, parent):
Change 1 of 2 Show Entire File tortoisehg/​hgqt/​hgviewlib/​hgrepoviewer.py Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/hgrepoviewer.py
 
23
24
25
26
27
28
29
30
31
32
 
 
 
 
 
 
 
33
34
35
 
522
523
524
525
 
526
527
528
 
23
24
25
 
 
 
 
 
 
 
26
27
28
29
30
31
32
33
34
35
 
522
523
524
 
525
526
527
528
@@ -23,13 +23,13 @@
 from tortoisehg.hgqt.hgviewlib.hggraph import diff as revdiff  from tortoisehg.hgqt.hgviewlib.decorators import timeit   -from tortoisehg.hgqt.hgviewlib.qt4 import icon as geticon -from tortoisehg.hgqt.hgviewlib.qt4.hgrepomodel import HgRepoListModel, HgFileListModel -from tortoisehg.hgqt.hgviewlib.qt4.hgfiledialog import FileViewer, FileDiffViewer -from tortoisehg.hgqt.hgviewlib.qt4.hgmanifestdialog import ManifestViewer -from tortoisehg.hgqt.hgviewlib.qt4.hgdialogmixin import HgDialogMixin -from tortoisehg.hgqt.hgviewlib.qt4.quickbar import FindInGraphlogQuickBar -from tortoisehg.hgqt.hgviewlib.qt4.helpviewer import HelpViewer +from tortoisehg.hgqt.hgviewlib import icon as geticon +from tortoisehg.hgqt.hgviewlib.hgrepomodel import HgRepoListModel, HgFileListModel +from tortoisehg.hgqt.hgviewlib.hgfiledialog import FileViewer, FileDiffViewer +from tortoisehg.hgqt.hgviewlib.hgmanifestdialog import ManifestViewer +from tortoisehg.hgqt.hgviewlib.hgdialogmixin import HgDialogMixin +from tortoisehg.hgqt.hgviewlib.quickbar import FindInGraphlogQuickBar +from tortoisehg.hgqt.hgviewlib.helpviewer import HelpViewer    from tortoisehg.util import paths   @@ -522,7 +522,7 @@
  w.activateWindow()    def run(ui, *pats, **opts): - from tortoisehg.hgqt.hgviewlib.qt4 import setup_font_substitutions + from tortoisehg.hgqt.hgviewlib import setup_font_substitutions   setup_font_substitutions()     repo = None
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​README Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/README
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​back.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/back.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​clean.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/clean.svg
(No changes)
tortoisehg/​hgqt/​hgviewlib/​icons/​close.png Side by side
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/close.png
Removed image
Added image
Subtracted image Added image
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​down.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/down.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​find.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/find.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​forward.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/forward.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​goto.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/goto.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​help.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/help.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​left.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/left.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​leftright.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/leftright.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​modified.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/modified.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​mqdiff.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/mqdiff.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​mqdiff_x.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/mqdiff_x.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​mqpatch.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/mqpatch.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​mqpatch_x.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/mqpatch_x.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​quit.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/quit.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​reload.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/reload.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​right.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/right.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​icons/​up.svg Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/icons/up.svg
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​lexers.py Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/lexers.py
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​manifestviewer.ui Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/manifestviewer.ui
(No changes)
Show Entire File tortoisehg/​hgqt/​hgviewlib/​manifestviewer_ui.py Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/manifestviewer_ui.py
(No changes)
Change 1 of 2 Show Entire File tortoisehg/​hgqt/​hgviewlib/​quickbar.py Stacked
renamed from tortoisehg/hgqt/hgviewlib/qt4/quickbar.py
 
23
24
25
26
 
27
28
29
 
318
319
320
321
 
322
323
324
 
23
24
25
 
26
27
28
29
 
318
319
320
 
321
322
323
324
@@ -23,7 +23,7 @@
   from tortoisehg.util.util import Curry   -from tortoisehg.hgqt.hgviewlib.qt4 import icon as geticon +from tortoisehg.hgqt.hgviewlib import icon as geticon    Qt = QtCore.Qt  connect = QtCore.QObject.connect @@ -318,7 +318,7 @@
   if __name__ == "__main__":   import sys - import hgviewlib.qt4 # to force importation of resource module w/ icons + import hgviewlib # to force importation of resource module w/ icons   app = QtGui.QApplication(sys.argv)   root = QtGui.QMainWindow()   w = QtGui.QFrame()
 
361
362
363
364
 
365
366
367
 
361
362
363
 
364
365
366
367
@@ -361,7 +361,7 @@
   def log(ui, *pats, **opts):   """Repository Explorer (changelog viewer)""" - from tortoisehg.hgqt.hgviewlib.qt4.hgrepoviewer import run + from tortoisehg.hgqt.hgviewlib.hgrepoviewer import run   qtrun(run, ui, *pats, **opts)    ### help management, adapted from mercurial.commands.help_()