eric6/Plugins/VcsPlugins/vcsSubversion/SvnStatusDialog.py

Sat, 31 Aug 2019 12:58:11 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 31 Aug 2019 12:58:11 +0200
branch
without_py2_and_pyqt4
changeset 7192
a22eee00b052
parent 6942
2602857055c5
child 7229
53054eb5b15a
permissions
-rw-r--r--

Started removing runtime support for Python2 and PyQt4.

0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
6645
ad476851d7e0 Updated copyright for 2019.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6197
diff changeset
3 # Copyright (c) 2003 - 2019 Detlev Offenbach <detlev@die-offenbachs.de>
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
7 Module implementing a dialog to show the output of the svn status command
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
8 process.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10
3145
a9de05d4a22f # __IGNORE_WARNING__ added/ removed.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3060
diff changeset
11 from __future__ import unicode_literals
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2406
diff changeset
12
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 import os
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3621
diff changeset
15 from PyQt5.QtCore import QTimer, QProcess, QRegExp, Qt, pyqtSlot
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3621
diff changeset
16 from PyQt5.QtWidgets import QWidget, QHeaderView, QLineEdit, QApplication, \
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3621
diff changeset
17 QMenu, QDialogButtonBox, QTreeWidgetItem
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
19 from E5Gui.E5Application import e5App
536
6d8d39753c82 Started replaceing QMessageBox methods with own methods.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 500
diff changeset
20 from E5Gui import E5MessageBox
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
22 from .Ui_SvnStatusDialog import Ui_SvnStatusDialog
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 import Preferences
5848
56388f41b1e6 Fixed an issue sending input to the mercurial and subversion processes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5624
diff changeset
25 from Globals import strToQByteArray
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
27
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 class SvnStatusDialog(QWidget, Ui_SvnStatusDialog):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 """
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
30 Class implementing a dialog to show the output of the svn status command
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
31 process.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 """
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
33 def __init__(self, vcs, parent=None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 @param vcs reference to the vcs object
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 @param parent parent widget (QWidget)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 """
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2406
diff changeset
40 super(SvnStatusDialog, self).__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 self.setupUi(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
43 self.__toBeCommittedColumn = 0
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
44 self.__changelistColumn = 1
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
45 self.__statusColumn = 2
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
46 self.__propStatusColumn = 3
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
47 self.__lockedColumn = 4
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
48 self.__historyColumn = 5
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
49 self.__switchedColumn = 6
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
50 self.__lockinfoColumn = 7
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
51 self.__upToDateColumn = 8
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
52 self.__pathColumn = 12
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 self.__lastColumn = self.statusList.columnCount()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 self.refreshButton = \
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
56 self.buttonBox.addButton(self.tr("Refresh"),
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
57 QDialogButtonBox.ActionRole)
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
58 self.refreshButton.setToolTip(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
59 self.tr("Press to refresh the status display"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 self.refreshButton.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
64 self.diff = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 self.vcs = vcs
495
b31b0bffa5b0 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
66 self.vcs.committed.connect(self.__committed)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67
4126
c28d0cf3b639 Some changes to the various VCS interfaces to use one dialog instead of creating a new one each time.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4072
diff changeset
68 self.process = QProcess()
c28d0cf3b639 Some changes to the various VCS interfaces to use one dialog instead of creating a new one each time.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4072
diff changeset
69 self.process.finished.connect(self.__procFinished)
c28d0cf3b639 Some changes to the various VCS interfaces to use one dialog instead of creating a new one each time.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4072
diff changeset
70 self.process.readyReadStandardOutput.connect(self.__readStdout)
c28d0cf3b639 Some changes to the various VCS interfaces to use one dialog instead of creating a new one each time.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4072
diff changeset
71 self.process.readyReadStandardError.connect(self.__readStderr)
c28d0cf3b639 Some changes to the various VCS interfaces to use one dialog instead of creating a new one each time.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4072
diff changeset
72
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 self.statusList.headerItem().setText(self.__lastColumn, "")
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
74 self.statusList.header().setSortIndicator(self.__pathColumn,
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
75 Qt.AscendingOrder)
1268
4fc337f391c9 Fixed the treatment of the Subversion version number.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
76 if self.vcs.version < (1, 5, 0):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 self.statusList.header().hideSection(self.__changelistColumn)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 self.menuactions = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 self.menu = QMenu()
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
81 self.menuactions.append(self.menu.addAction(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
82 self.tr("Commit changes to repository..."), self.__commit))
1294
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
83 self.menuactions.append(self.menu.addAction(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
84 self.tr("Select all for commit"), self.__commitSelectAll))
1294
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
85 self.menuactions.append(self.menu.addAction(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
86 self.tr("Deselect all from commit"), self.__commitDeselectAll))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 self.menu.addSeparator()
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
88 self.menuactions.append(self.menu.addAction(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
89 self.tr("Add to repository"), self.__add))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
90 self.menuactions.append(self.menu.addAction(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
91 self.tr("Show differences"), self.__diff))
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
92 self.menuactions.append(self.menu.addAction(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
93 self.tr("Show differences side-by-side"), self.__sbsDiff))
2845
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
94 self.menuactions.append(self.menu.addAction(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
95 self.tr("Revert changes"), self.__revert))
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
96 self.menuactions.append(self.menu.addAction(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
97 self.tr("Restore missing"), self.__restoreMissing))
1268
4fc337f391c9 Fixed the treatment of the Subversion version number.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
98 if self.vcs.version >= (1, 5, 0):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 self.menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 self.menuactions.append(self.menu.addAction(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
101 self.tr("Add to Changelist"), self.__addToChangelist))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 self.menuactions.append(self.menu.addAction(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
103 self.tr("Remove from Changelist"),
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
104 self.__removeFromChangelist))
1268
4fc337f391c9 Fixed the treatment of the Subversion version number.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
105 if self.vcs.version >= (1, 2, 0):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 self.menu.addSeparator()
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
107 self.menuactions.append(self.menu.addAction(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
108 self.tr("Lock"), self.__lock))
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
109 self.menuactions.append(self.menu.addAction(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
110 self.tr("Unlock"), self.__unlock))
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
111 self.menuactions.append(self.menu.addAction(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
112 self.tr("Break lock"),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 self.__breakLock))
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
114 self.menuactions.append(self.menu.addAction(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
115 self.tr("Steal lock"),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 self.__stealLock))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117 self.menu.addSeparator()
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
118 self.menuactions.append(self.menu.addAction(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
119 self.tr("Adjust column sizes"),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 self.__resizeColumns))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 for act in self.menuactions:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 act.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 self.statusList.setContextMenuPolicy(Qt.CustomContextMenu)
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
125 self.statusList.customContextMenuRequested.connect(
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
126 self.__showContextMenu)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 self.modifiedIndicators = [
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
129 self.tr('added'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
130 self.tr('deleted'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
131 self.tr('modified'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 ]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
134 self.missingIndicators = [
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
135 self.tr('missing'),
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
136 ]
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
137
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
138 self.unversionedIndicators = [
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
139 self.tr('unversioned'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
140 ]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
141
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142 self.lockedIndicators = [
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
143 self.tr('locked'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
144 ]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
145
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146 self.stealBreakLockIndicators = [
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
147 self.tr('other lock'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
148 self.tr('stolen lock'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
149 self.tr('broken lock'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
150 ]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
152 self.unlockedIndicators = [
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
153 self.tr('not locked'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
154 ]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
155
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
156 self.status = {
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
157 ' ': self.tr('normal'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
158 'A': self.tr('added'),
6197
ec4b978d3d88 SvnStatusDialog: Fixed an issue in parsing the svn output.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
159 'C': self.tr('conflict'),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
160 'D': self.tr('deleted'),
6197
ec4b978d3d88 SvnStatusDialog: Fixed an issue in parsing the svn output.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
161 'I': self.tr('ignored'),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
162 'M': self.tr('modified'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
163 'R': self.tr('replaced'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
164 'X': self.tr('external'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
165 '?': self.tr('unversioned'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
166 '!': self.tr('missing'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
167 '~': self.tr('type error'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
168 }
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
169 self.propStatus = {
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
170 ' ': self.tr('normal'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
171 'M': self.tr('modified'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
172 'C': self.tr('conflict'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
173 }
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
174 self.locked = {
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
175 ' ': self.tr('no'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
176 'L': self.tr('yes'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
177 }
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
178 self.history = {
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
179 ' ': self.tr('no'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
180 '+': self.tr('yes'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
181 }
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
182 self.switched = {
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
183 ' ': self.tr('no'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
184 'S': self.tr('yes'),
6197
ec4b978d3d88 SvnStatusDialog: Fixed an issue in parsing the svn output.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
185 'X': self.tr('external')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
186 }
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
187 self.lockinfo = {
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
188 ' ': self.tr('not locked'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
189 'K': self.tr('locked'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
190 'O': self.tr('other lock'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
191 'T': self.tr('stolen lock'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
192 'B': self.tr('broken lock'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
193 }
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
194 self.uptodate = {
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
195 ' ': self.tr('yes'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
196 '*': self.tr('no'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
197 }
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
198
3009
bf5ae5d7477d Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2963
diff changeset
199 self.rx_status = QRegExp(
3044
a6cee59c80a4 Made the subversion status regexp a bit more relaxed with respect to the author name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3037
diff changeset
200 '(.{8,9})\\s+([0-9-]+)\\s+([0-9?]+)\\s+(\\S+)\\s+(.+)\\s*')
3621
15f23ed3f216 Fixed a few source code style issues found by the updated pe8 checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
201 # flags (8 or 9 anything), revision, changed rev, author, path
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
202 self.rx_status2 = \
1773
05265254f212 Fixed the Subversion and PySvn status commands (issue caused by latest Subversion and PySvn updates).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1760
diff changeset
203 QRegExp('(.{8,9})\\s+(.+)\\s*')
3621
15f23ed3f216 Fixed a few source code style issues found by the updated pe8 checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
204 # flags (8 or 9 anything), path
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
205 self.rx_changelist = \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
206 QRegExp('--- \\S+ .([\\w\\s]+).:\\s+')
3621
15f23ed3f216 Fixed a few source code style issues found by the updated pe8 checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
207 # three dashes, Changelist (translated), quote,
15f23ed3f216 Fixed a few source code style issues found by the updated pe8 checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
208 # changelist name, quote, :
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
209
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
210 self.__nonverbose = True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
211
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
212 def __resort(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
213 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
214 Private method to resort the tree.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
215 """
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
216 self.statusList.sortItems(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
217 self.statusList.sortColumn(),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
218 self.statusList.header().sortIndicatorOrder())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
219
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
220 def __resizeColumns(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
221 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
222 Private method to resize the list columns.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
223 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
224 self.statusList.header().resizeSections(QHeaderView.ResizeToContents)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
225 self.statusList.header().setStretchLastSection(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
226
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
227 def __generateItem(self, status, propStatus, locked, history, switched,
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
228 lockinfo, uptodate, revision, change, author, path):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
229 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
230 Private method to generate a status item in the status list.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
231
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
232 @param status status indicator (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
233 @param propStatus property status indicator (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
234 @param locked locked indicator (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
235 @param history history indicator (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
236 @param switched switched indicator (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
237 @param lockinfo lock indicator (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
238 @param uptodate up to date indicator (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
239 @param revision revision string (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
240 @param change revision of last change (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
241 @param author author of the last change (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
242 @param path path of the file or directory (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
243 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
244 if self.__nonverbose and \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
245 status == " " and \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
246 propStatus == " " and \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
247 locked == " " and \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
248 history == " " and \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
249 switched == " " and \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
250 lockinfo == " " and \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
251 uptodate == " " and \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
252 self.currentChangelist == "":
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
253 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
254
1640
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
255 if revision == "":
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
256 rev = ""
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
257 else:
1760
ffa7d2983f0a Fixed a bug in the Subversion interface caused by a change in the svn output.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1746
diff changeset
258 try:
ffa7d2983f0a Fixed a bug in the Subversion interface caused by a change in the svn output.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1746
diff changeset
259 rev = int(revision)
ffa7d2983f0a Fixed a bug in the Subversion interface caused by a change in the svn output.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1746
diff changeset
260 except ValueError:
ffa7d2983f0a Fixed a bug in the Subversion interface caused by a change in the svn output.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1746
diff changeset
261 rev = revision
1640
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
262 if change == "":
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
263 chg = ""
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
264 else:
1760
ffa7d2983f0a Fixed a bug in the Subversion interface caused by a change in the svn output.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1746
diff changeset
265 try:
ffa7d2983f0a Fixed a bug in the Subversion interface caused by a change in the svn output.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1746
diff changeset
266 chg = int(change)
ffa7d2983f0a Fixed a bug in the Subversion interface caused by a change in the svn output.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1746
diff changeset
267 except ValueError:
ffa7d2983f0a Fixed a bug in the Subversion interface caused by a change in the svn output.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1746
diff changeset
268 chg = change
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
269 statusText = self.status[status]
1640
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
270
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
271 itm = QTreeWidgetItem(self.statusList)
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
272 itm.setData(0, Qt.DisplayRole, "")
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
273 itm.setData(1, Qt.DisplayRole, self.currentChangelist)
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
274 itm.setData(2, Qt.DisplayRole, statusText)
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
275 itm.setData(3, Qt.DisplayRole, self.propStatus[propStatus])
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
276 itm.setData(4, Qt.DisplayRole, self.locked[locked])
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
277 itm.setData(5, Qt.DisplayRole, self.history[history])
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
278 itm.setData(6, Qt.DisplayRole, self.switched[switched])
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
279 itm.setData(7, Qt.DisplayRole, self.lockinfo[lockinfo])
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
280 itm.setData(8, Qt.DisplayRole, self.uptodate[uptodate])
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
281 itm.setData(9, Qt.DisplayRole, rev)
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
282 itm.setData(10, Qt.DisplayRole, chg)
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
283 itm.setData(11, Qt.DisplayRole, author)
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
284 itm.setData(12, Qt.DisplayRole, path)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
285
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
286 itm.setTextAlignment(1, Qt.AlignLeft)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
287 itm.setTextAlignment(2, Qt.AlignHCenter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
288 itm.setTextAlignment(3, Qt.AlignHCenter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
289 itm.setTextAlignment(4, Qt.AlignHCenter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
290 itm.setTextAlignment(5, Qt.AlignHCenter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
291 itm.setTextAlignment(6, Qt.AlignHCenter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
292 itm.setTextAlignment(7, Qt.AlignHCenter)
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
293 itm.setTextAlignment(8, Qt.AlignHCenter)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
294 itm.setTextAlignment(9, Qt.AlignRight)
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
295 itm.setTextAlignment(10, Qt.AlignRight)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
296 itm.setTextAlignment(11, Qt.AlignLeft)
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
297 itm.setTextAlignment(12, Qt.AlignLeft)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
298
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
299 if status in "ADM" or propStatus in "M":
1294
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
300 itm.setFlags(itm.flags() | Qt.ItemIsUserCheckable)
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
301 itm.setCheckState(self.__toBeCommittedColumn, Qt.Checked)
1294
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
302 else:
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
303 itm.setFlags(itm.flags() & ~Qt.ItemIsUserCheckable)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
304
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
305 self.hidePropertyStatusColumn = self.hidePropertyStatusColumn and \
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
306 propStatus == " "
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
307 self.hideLockColumns = self.hideLockColumns and \
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
308 locked == " " and lockinfo == " "
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
309 self.hideUpToDateColumn = self.hideUpToDateColumn and uptodate == " "
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
310 self.hideHistoryColumn = self.hideHistoryColumn and history == " "
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
311 self.hideSwitchedColumn = self.hideSwitchedColumn and switched == " "
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
312
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
313 if statusText not in self.__statusFilters:
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
314 self.__statusFilters.append(statusText)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
315
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
316 def closeEvent(self, e):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
317 """
3591
2f2a4a76dd22 Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3484
diff changeset
318 Protected slot implementing a close event handler.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
319
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
320 @param e close event (QCloseEvent)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
321 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
322 if self.process is not None and \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
323 self.process.state() != QProcess.NotRunning:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
324 self.process.terminate()
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 495
diff changeset
325 QTimer.singleShot(2000, self.process.kill)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
326 self.process.waitForFinished(3000)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
327
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
328 e.accept()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
329
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
330 def start(self, fn):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
331 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
332 Public slot to start the svn status command.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
333
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
334 @param fn filename(s)/directoryname(s) to show the status of
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
335 (string or list of strings)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
336 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
337 self.errorGroup.hide()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
338 self.intercept = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
339 self.args = fn
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
340
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
341 for act in self.menuactions:
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
342 act.setEnabled(False)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
343
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
344 self.addButton.setEnabled(False)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
345 self.commitButton.setEnabled(False)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
346 self.diffButton.setEnabled(False)
2845
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
347 self.sbsDiffButton.setEnabled(False)
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
348 self.revertButton.setEnabled(False)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
349 self.restoreButton.setEnabled(False)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
350
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
351 self.statusFilterCombo.clear()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
352 self.__statusFilters = []
4126
c28d0cf3b639 Some changes to the various VCS interfaces to use one dialog instead of creating a new one each time.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4072
diff changeset
353 self.statusList.clear()
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
354
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
355 self.currentChangelist = ""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
356 self.changelistFound = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
357
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
358 self.hidePropertyStatusColumn = True
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
359 self.hideLockColumns = True
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
360 self.hideUpToDateColumn = True
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
361 self.hideHistoryColumn = True
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
362 self.hideSwitchedColumn = True
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
363
4126
c28d0cf3b639 Some changes to the various VCS interfaces to use one dialog instead of creating a new one each time.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4072
diff changeset
364 self.process.kill()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
365
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
366 args = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
367 args.append('status')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
368 self.vcs.addArguments(args, self.vcs.options['global'])
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
369 self.vcs.addArguments(args, self.vcs.options['status'])
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
370 if '--verbose' not in self.vcs.options['global'] and \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
371 '--verbose' not in self.vcs.options['status']:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
372 args.append('--verbose')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
373 self.__nonverbose = True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
374 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
375 self.__nonverbose = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
376 if '--show-updates' in self.vcs.options['status'] or \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
377 '-u' in self.vcs.options['status']:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
378 self.activateWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
379 self.raise_()
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
380 if isinstance(fn, list):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
381 self.dname, fnames = self.vcs.splitPathList(fn)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
382 self.vcs.addArguments(args, fnames)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
383 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
384 self.dname, fname = self.vcs.splitPath(fn)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
385 args.append(fname)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
386
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
387 self.process.setWorkingDirectory(self.dname)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
388
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
389 self.setWindowTitle(self.tr('Subversion Status'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
390
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
391 self.process.start('svn', args)
2771
281c9b30dd91 Changed all QProcess.waitForStarted() calls to use a 5s timeout (except the debugger interfaces, which have a 10s timeout).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2616
diff changeset
392 procStarted = self.process.waitForStarted(5000)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
393 if not procStarted:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
394 self.inputGroup.setEnabled(False)
1746
6c74208f22a2 Some little enhancements to the Subversion interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1640
diff changeset
395 self.inputGroup.hide()
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
396 E5MessageBox.critical(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
397 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
398 self.tr('Process Generation Error'),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
399 self.tr(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
400 'The process {0} could not be started. '
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
401 'Ensure, that it is in the search path.'
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
402 ).format('svn'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
403 else:
4126
c28d0cf3b639 Some changes to the various VCS interfaces to use one dialog instead of creating a new one each time.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4072
diff changeset
404 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False)
c28d0cf3b639 Some changes to the various VCS interfaces to use one dialog instead of creating a new one each time.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4072
diff changeset
405 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(True)
c28d0cf3b639 Some changes to the various VCS interfaces to use one dialog instead of creating a new one each time.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4072
diff changeset
406 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True)
c28d0cf3b639 Some changes to the various VCS interfaces to use one dialog instead of creating a new one each time.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4072
diff changeset
407
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
408 self.inputGroup.setEnabled(True)
1746
6c74208f22a2 Some little enhancements to the Subversion interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1640
diff changeset
409 self.inputGroup.show()
4126
c28d0cf3b639 Some changes to the various VCS interfaces to use one dialog instead of creating a new one each time.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4072
diff changeset
410 self.refreshButton.setEnabled(False)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
411
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
412 def __finish(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
413 """
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
414 Private slot called when the process finished or the user pressed
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
415 the button.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
416 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
417 if self.process is not None and \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
418 self.process.state() != QProcess.NotRunning:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
419 self.process.terminate()
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 495
diff changeset
420 QTimer.singleShot(2000, self.process.kill)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
421 self.process.waitForFinished(3000)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
422
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
423 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
424 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
425 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
3009
bf5ae5d7477d Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2963
diff changeset
426 self.buttonBox.button(QDialogButtonBox.Close).setFocus(
bf5ae5d7477d Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2963
diff changeset
427 Qt.OtherFocusReason)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
428
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
429 self.inputGroup.setEnabled(False)
1746
6c74208f22a2 Some little enhancements to the Subversion interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1640
diff changeset
430 self.inputGroup.hide()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
431 self.refreshButton.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
432
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
433 self.__statusFilters.sort()
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
434 self.__statusFilters.insert(0, "<{0}>".format(self.tr("all")))
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
435 self.statusFilterCombo.addItems(self.__statusFilters)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
436
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
437 for act in self.menuactions:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
438 act.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
439
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
440 self.__resort()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
441 self.__resizeColumns()
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
442
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
443 self.statusList.setColumnHidden(self.__changelistColumn,
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
444 not self.changelistFound)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
445 self.statusList.setColumnHidden(self.__propStatusColumn,
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
446 self.hidePropertyStatusColumn)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
447 self.statusList.setColumnHidden(self.__lockedColumn,
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
448 self.hideLockColumns)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
449 self.statusList.setColumnHidden(self.__lockinfoColumn,
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
450 self.hideLockColumns)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
451 self.statusList.setColumnHidden(self.__upToDateColumn,
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
452 self.hideUpToDateColumn)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
453 self.statusList.setColumnHidden(self.__historyColumn,
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
454 self.hideHistoryColumn)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
455 self.statusList.setColumnHidden(self.__switchedColumn,
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
456 self.hideSwitchedColumn)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
457
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
458 self.__updateButtons()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
459 self.__updateCommitButton()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
460
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
461 def on_buttonBox_clicked(self, button):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
462 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
463 Private slot called by a button of the button box clicked.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
464
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
465 @param button button that was clicked (QAbstractButton)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
466 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
467 if button == self.buttonBox.button(QDialogButtonBox.Close):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
468 self.close()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
469 elif button == self.buttonBox.button(QDialogButtonBox.Cancel):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
470 self.__finish()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
471 elif button == self.refreshButton:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
472 self.on_refreshButton_clicked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
473
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
474 def __procFinished(self, exitCode, exitStatus):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
475 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
476 Private slot connected to the finished signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
477
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
478 @param exitCode exit code of the process (integer)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
479 @param exitStatus exit status of the process (QProcess.ExitStatus)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
480 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
481 self.__finish()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
482
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
483 def __readStdout(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
484 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
485 Private slot to handle the readyReadStandardOutput signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
486
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
487 It reads the output of the process, formats it and inserts it into
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
488 the contents pane.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
489 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
490 if self.process is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
491 self.process.setReadChannel(QProcess.StandardOutput)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
492
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
493 while self.process.canReadLine():
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
494 s = str(self.process.readLine(),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
495 Preferences.getSystem("IOEncoding"),
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
496 'replace')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
497 if self.rx_status.exactMatch(s):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
498 flags = self.rx_status.cap(1)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
499 rev = self.rx_status.cap(2)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
500 change = self.rx_status.cap(3)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
501 author = self.rx_status.cap(4)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
502 path = self.rx_status.cap(5).strip()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
503
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
504 self.__generateItem(flags[0], flags[1], flags[2], flags[3],
1773
05265254f212 Fixed the Subversion and PySvn status commands (issue caused by latest Subversion and PySvn updates).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1760
diff changeset
505 flags[4], flags[5], flags[-1], rev,
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
506 change, author, path)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
507 elif self.rx_status2.exactMatch(s):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
508 flags = self.rx_status2.cap(1)
1640
1699d46026cd Fixed a compatibility issue with Qt 4.8.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1532
diff changeset
509 path = self.rx_status2.cap(2).strip()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
510
6197
ec4b978d3d88 SvnStatusDialog: Fixed an issue in parsing the svn output.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
511 if flags[-1] in self.uptodate:
ec4b978d3d88 SvnStatusDialog: Fixed an issue in parsing the svn output.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
512 self.__generateItem(flags[0], flags[1], flags[2],
ec4b978d3d88 SvnStatusDialog: Fixed an issue in parsing the svn output.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
513 flags[3], flags[4], flags[5],
ec4b978d3d88 SvnStatusDialog: Fixed an issue in parsing the svn output.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
514 flags[-1], "", "", "", path)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
515 elif self.rx_changelist.exactMatch(s):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
516 self.currentChangelist = self.rx_changelist.cap(1)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
517 self.changelistFound = True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
518
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
519 def __readStderr(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
520 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
521 Private slot to handle the readyReadStandardError signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
522
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
523 It reads the error output of the process and inserts it into the
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
524 error pane.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
525 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
526 if self.process is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
527 self.errorGroup.show()
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
528 s = str(self.process.readAllStandardError(),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
529 Preferences.getSystem("IOEncoding"),
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
530 'replace')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
531 self.errors.insertPlainText(s)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
532 self.errors.ensureCursorVisible()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
533
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
534 def on_passwordCheckBox_toggled(self, isOn):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
535 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
536 Private slot to handle the password checkbox toggled.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
537
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
538 @param isOn flag indicating the status of the check box (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
539 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
540 if isOn:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
541 self.input.setEchoMode(QLineEdit.Password)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
542 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
543 self.input.setEchoMode(QLineEdit.Normal)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
544
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
545 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
546 def on_sendButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
547 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
548 Private slot to send the input to the subversion process.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
549 """
5588
6ba512d9f46a Continued fixing code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5587
diff changeset
550 inputTxt = self.input.text()
6ba512d9f46a Continued fixing code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5587
diff changeset
551 inputTxt += os.linesep
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
552
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
553 if self.passwordCheckBox.isChecked():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
554 self.errors.insertPlainText(os.linesep)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
555 self.errors.ensureCursorVisible()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
556 else:
5588
6ba512d9f46a Continued fixing code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5587
diff changeset
557 self.errors.insertPlainText(inputTxt)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
558 self.errors.ensureCursorVisible()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
559
5848
56388f41b1e6 Fixed an issue sending input to the mercurial and subversion processes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5624
diff changeset
560 self.process.write(strToQByteArray(inputTxt))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
561
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
562 self.passwordCheckBox.setChecked(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
563 self.input.clear()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
564
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
565 def on_input_returnPressed(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
566 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
567 Private slot to handle the press of the return key in the input field.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
568 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
569 self.intercept = True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
570 self.on_sendButton_clicked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
571
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
572 def keyPressEvent(self, evt):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
573 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
574 Protected slot to handle a key press event.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
575
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
576 @param evt the key press event (QKeyEvent)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
577 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
578 if self.intercept:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
579 self.intercept = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
580 evt.accept()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
581 return
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2406
diff changeset
582 super(SvnStatusDialog, self).keyPressEvent(evt)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
583
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
584 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
585 def on_refreshButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
586 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
587 Private slot to refresh the status display.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
588 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
589 self.start(self.args)
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
590
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
591 def __updateButtons(self):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
592 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
593 Private method to update the VCS buttons status.
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
594 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
595 modified = len(self.__getModifiedItems())
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
596 unversioned = len(self.__getUnversionedItems())
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
597 missing = len(self.__getMissingItems())
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
598
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
599 self.addButton.setEnabled(unversioned)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
600 self.diffButton.setEnabled(modified)
2845
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
601 self.sbsDiffButton.setEnabled(modified == 1)
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
602 self.revertButton.setEnabled(modified)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
603 self.restoreButton.setEnabled(missing)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
604
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
605 def __updateCommitButton(self):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
606 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
607 Private method to update the Commit button status.
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
608 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
609 commitable = len(self.__getCommitableItems())
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
610 self.commitButton.setEnabled(commitable)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
611
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
612 @pyqtSlot(str)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
613 def on_statusFilterCombo_activated(self, txt):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
614 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
615 Private slot to react to the selection of a status filter.
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
616
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
617 @param txt selected status filter (string)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
618 """
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
619 if txt == "<{0}>".format(self.tr("all")):
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
620 for topIndex in range(self.statusList.topLevelItemCount()):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
621 topItem = self.statusList.topLevelItem(topIndex)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
622 topItem.setHidden(False)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
623 else:
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
624 for topIndex in range(self.statusList.topLevelItemCount()):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
625 topItem = self.statusList.topLevelItem(topIndex)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
626 topItem.setHidden(topItem.text(self.__statusColumn) != txt)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
627
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
628 @pyqtSlot(QTreeWidgetItem, int)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
629 def on_statusList_itemChanged(self, item, column):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
630 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
631 Private slot to act upon item changes.
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
632
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
633 @param item reference to the changed item (QTreeWidgetItem)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
634 @param column index of column that changed (integer)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
635 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
636 if column == self.__toBeCommittedColumn:
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
637 self.__updateCommitButton()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
638
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
639 @pyqtSlot()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
640 def on_statusList_itemSelectionChanged(self):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
641 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
642 Private slot to act upon changes of selected items.
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
643 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
644 self.__updateButtons()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
645
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
646 @pyqtSlot()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
647 def on_commitButton_clicked(self):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
648 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
649 Private slot to handle the press of the Commit button.
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
650 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
651 self.__commit()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
652
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
653 @pyqtSlot()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
654 def on_addButton_clicked(self):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
655 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
656 Private slot to handle the press of the Add button.
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
657 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
658 self.__add()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
659
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
660 @pyqtSlot()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
661 def on_diffButton_clicked(self):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
662 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
663 Private slot to handle the press of the Differences button.
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
664 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
665 self.__diff()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
666
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
667 @pyqtSlot()
2845
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
668 def on_sbsDiffButton_clicked(self):
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
669 """
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
670 Private slot to handle the press of the Side-by-Side Diff button.
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
671 """
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
672 self.__sbsDiff()
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
673
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
674 @pyqtSlot()
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
675 def on_revertButton_clicked(self):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
676 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
677 Private slot to handle the press of the Revert button.
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
678 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
679 self.__revert()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
680
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
681 @pyqtSlot()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
682 def on_restoreButton_clicked(self):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
683 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
684 Private slot to handle the press of the Restore button.
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
685 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
686 self.__restoreMissing()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
687
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
688 ###########################################################################
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
689 ## Context menu handling methods
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
690 ###########################################################################
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
691
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
692 def __showContextMenu(self, coord):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
693 """
3591
2f2a4a76dd22 Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3484
diff changeset
694 Private slot to show the context menu of the status list.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
695
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
696 @param coord the position of the mouse pointer (QPoint)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
697 """
3895
05a919adc36b Fixed a annoyance in the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3656
diff changeset
698 self.menu.popup(self.statusList.mapToGlobal(coord))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
699
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
700 def __commit(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
701 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
702 Private slot to handle the Commit context menu entry.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
703 """
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
704 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
705 for itm in self.__getCommitableItems()]
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
706 if not names:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
707 E5MessageBox.information(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
708 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
709 self.tr("Commit"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
710 self.tr("""There are no entries selected to be"""
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
711 """ committed."""))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
712 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
713
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
714 if Preferences.getVCS("AutoSaveFiles"):
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
715 vm = e5App().getObject("ViewManager")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
716 for name in names:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
717 vm.saveEditor(name)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
718 self.vcs.vcsCommit(names, '')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
719
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
720 def __committed(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
721 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
722 Private slot called after the commit has finished.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
723 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
724 if self.isVisible():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
725 self.on_refreshButton_clicked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
726 self.vcs.checkVCSStatus()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
727
1294
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
728 def __commitSelectAll(self):
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
729 """
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
730 Private slot to select all entries for commit.
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
731 """
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
732 self.__commitSelect(True)
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
733
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
734 def __commitDeselectAll(self):
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
735 """
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
736 Private slot to deselect all entries from commit.
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
737 """
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
738 self.__commitSelect(False)
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
739
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
740 def __add(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
741 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
742 Private slot to handle the Add context menu entry.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
743 """
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
744 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
745 for itm in self.__getUnversionedItems()]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
746 if not names:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
747 E5MessageBox.information(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
748 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
749 self.tr("Add"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
750 self.tr("""There are no unversioned entries"""
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
751 """ available/selected."""))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
752 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
753
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
754 self.vcs.vcsAdd(names)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
755 self.on_refreshButton_clicked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
756
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
757 project = e5App().getObject("Project")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
758 for name in names:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
759 project.getModel().updateVCSStatus(name)
175
c55cab724965 Changed the status dialog a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
760 self.vcs.checkVCSStatus()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
761
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
762 def __revert(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
763 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
764 Private slot to handle the Revert context menu entry.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
765 """
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
766 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
767 for itm in self.__getModifiedItems()]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
768 if not names:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
769 E5MessageBox.information(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
770 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
771 self.tr("Revert"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
772 self.tr("""There are no uncommitted changes"""
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
773 """ available/selected."""))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
774 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
775
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
776 self.vcs.vcsRevert(names)
2616
954b4069325b Fixed a little issue in the various VCS status dialogs __revert function causing the status dialog to get hidden behind the main window.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2406
diff changeset
777 self.raise_()
954b4069325b Fixed a little issue in the various VCS status dialogs __revert function causing the status dialog to get hidden behind the main window.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2406
diff changeset
778 self.activateWindow()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
779 self.on_refreshButton_clicked()
175
c55cab724965 Changed the status dialog a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
780
c55cab724965 Changed the status dialog a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
781 project = e5App().getObject("Project")
c55cab724965 Changed the status dialog a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
782 for name in names:
c55cab724965 Changed the status dialog a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 96
diff changeset
783 project.getModel().updateVCSStatus(name)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
784 self.vcs.checkVCSStatus()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
785
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
786 def __restoreMissing(self):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
787 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
788 Private slot to handle the Restore Missing context menu entry.
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
789 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
790 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
791 for itm in self.__getMissingItems()]
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
792 if not names:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
793 E5MessageBox.information(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
794 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
795 self.tr("Revert"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
796 self.tr("""There are no missing entries"""
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
797 """ available/selected."""))
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
798 return
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
799
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
800 self.vcs.vcsRevert(names)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
801 self.on_refreshButton_clicked()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
802 self.vcs.checkVCSStatus()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
803
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
804 def __diff(self):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
805 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
806 Private slot to handle the Diff context menu entry.
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
807 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
808 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
809 for itm in self.__getModifiedItems()]
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
810 if not names:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
811 E5MessageBox.information(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
812 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
813 self.tr("Differences"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
814 self.tr("""There are no uncommitted changes"""
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
815 """ available/selected."""))
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
816 return
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
817
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
818 if self.diff is None:
2406
975af671146d Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
819 from .SvnDiffDialog import SvnDiffDialog
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
820 self.diff = SvnDiffDialog(self.vcs)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
821 self.diff.show()
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
822 QApplication.processEvents()
4072
46fb585f60f2 Extended the diff dialogs of the various VCS interfaces to allow a refresh in certain situations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
823 self.diff.start(names, refreshable=True)
2845
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
824
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
825 def __sbsDiff(self):
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
826 """
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
827 Private slot to handle the Side-by-Side Diff context menu entry.
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
828 """
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
829 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
830 for itm in self.__getModifiedItems()]
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
831 if not names:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
832 E5MessageBox.information(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
833 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
834 self.tr("Side-by-Side Diff"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
835 self.tr("""There are no uncommitted changes"""
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
836 """ available/selected."""))
2845
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
837 return
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
838 elif len(names) > 1:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
839 E5MessageBox.information(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
840 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
841 self.tr("Side-by-Side Diff"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
842 self.tr("""Only one file with uncommitted changes"""
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
843 """ must be selected."""))
2845
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
844 return
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
845
2845
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
846 self.vcs.svnSbsDiff(names[0])
7e55c6268c35 Added capability to compare files side-by-side to the Subversion interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2771
diff changeset
847
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
848 def __lock(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
849 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
850 Private slot to handle the Lock context menu entry.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
851 """
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
852 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
853 for itm in self.__getLockActionItems(self.unlockedIndicators)]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
854 if not names:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
855 E5MessageBox.information(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
856 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
857 self.tr("Lock"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
858 self.tr("""There are no unlocked files"""
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
859 """ available/selected."""))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
860 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
861
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
862 self.vcs.svnLock(names, parent=self)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
863 self.on_refreshButton_clicked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
864
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
865 def __unlock(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
866 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
867 Private slot to handle the Unlock context menu entry.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
868 """
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
869 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
870 for itm in self.__getLockActionItems(self.lockedIndicators)]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
871 if not names:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
872 E5MessageBox.information(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
873 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
874 self.tr("Unlock"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
875 self.tr("""There are no locked files"""
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
876 """ available/selected."""))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
877 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
878
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
879 self.vcs.svnUnlock(names, parent=self)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
880 self.on_refreshButton_clicked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
881
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
882 def __breakLock(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
883 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
884 Private slot to handle the Break Lock context menu entry.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
885 """
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
886 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
887 for itm in self.__getLockActionItems(
3037
a417a0670a36 Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
888 self.stealBreakLockIndicators)]
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
889 if not names:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
890 E5MessageBox.information(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
891 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
892 self.tr("Break Lock"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
893 self.tr("""There are no locked files"""
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
894 """ available/selected."""))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
895 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
896
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 917
diff changeset
897 self.vcs.svnUnlock(names, parent=self, breakIt=True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
898 self.on_refreshButton_clicked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
899
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
900 def __stealLock(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
901 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
902 Private slot to handle the Break Lock context menu entry.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
903 """
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
904 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
905 for itm in self.__getLockActionItems(
3037
a417a0670a36 Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
906 self.stealBreakLockIndicators)]
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
907 if not names:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
908 E5MessageBox.information(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
909 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
910 self.tr("Steal Lock"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
911 self.tr("""There are no locked files"""
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
912 """ available/selected."""))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
913 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
914
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
915 self.vcs.svnLock(names, parent=self, stealIt=True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
916 self.on_refreshButton_clicked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
917
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
918 def __addToChangelist(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
919 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
920 Private slot to add entries to a changelist.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
921 """
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
922 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
923 for itm in self.__getNonChangelistItems()]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
924 if not names:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
925 E5MessageBox.information(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
926 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
927 self.tr("Remove from Changelist"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
928 self.tr(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
929 """There are no files available/selected not """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
930 """belonging to a changelist."""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
931 )
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
932 )
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
933 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
934 self.vcs.svnAddToChangelist(names)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
935 self.on_refreshButton_clicked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
936
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
937 def __removeFromChangelist(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
938 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
939 Private slot to remove entries from their changelists.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
940 """
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
941 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
942 for itm in self.__getChangelistItems()]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
943 if not names:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
944 E5MessageBox.information(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3009
diff changeset
945 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
946 self.tr("Remove from Changelist"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
947 self.tr(
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
948 """There are no files available/selected belonging"""
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
949 """ to a changelist."""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
950 )
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
951 )
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
952 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
953 self.vcs.svnRemoveFromChangelist(names)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
954 self.on_refreshButton_clicked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
955
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
956 def __getCommitableItems(self):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
957 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
958 Private method to retrieve all entries the user wants to commit.
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
959
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
960 @return list of all items, the user has checked
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
961 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
962 commitableItems = []
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
963 for index in range(self.statusList.topLevelItemCount()):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
964 itm = self.statusList.topLevelItem(index)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
965 if itm.checkState(self.__toBeCommittedColumn) == Qt.Checked:
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
966 commitableItems.append(itm)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
967 return commitableItems
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
968
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
969 def __getModifiedItems(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
970 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
971 Private method to retrieve all entries, that have a modified status.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
972
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
973 @return list of all items with a modified status
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
974 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
975 modifiedItems = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
976 for itm in self.statusList.selectedItems():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
977 if itm.text(self.__statusColumn) in self.modifiedIndicators or \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
978 itm.text(self.__propStatusColumn) in self.modifiedIndicators:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
979 modifiedItems.append(itm)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
980 return modifiedItems
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
981
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
982 def __getUnversionedItems(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
983 """
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
984 Private method to retrieve all entries, that have an unversioned
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
985 status.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
986
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
987 @return list of all items with an unversioned status
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
988 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
989 unversionedItems = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
990 for itm in self.statusList.selectedItems():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
991 if itm.text(self.__statusColumn) in self.unversionedIndicators:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
992 unversionedItems.append(itm)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
993 return unversionedItems
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
994
917
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
995 def __getMissingItems(self):
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
996 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
997 Private method to retrieve all entries, that have a missing status.
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
998
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
999 @return list of all items with a missing status
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
1000 """
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
1001 missingItems = []
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
1002 for itm in self.statusList.selectedItems():
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
1003 if itm.text(self.__statusColumn) in self.missingIndicators:
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
1004 missingItems.append(itm)
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
1005 return missingItems
746c54b643eb Added functionality to the VCS status dialogs to make them more general commit dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 889
diff changeset
1006
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1007 def __getLockActionItems(self, indicators):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1008 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1009 Private method to retrieve all emtries, that have a locked status.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1010
2963
745d38097b7f Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2845
diff changeset
1011 @param indicators list of indicators to check against (list of strings)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1012 @return list of all items with a locked status
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1013 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1014 lockitems = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1015 for itm in self.statusList.selectedItems():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1016 if itm.text(self.__lockinfoColumn) in indicators:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1017 lockitems.append(itm)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1018 return lockitems
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1019
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1020 def __getChangelistItems(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1021 """
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
1022 Private method to retrieve all entries, that are members of
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
1023 a changelist.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1024
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1025 @return list of all items belonging to a changelist
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1026 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1027 clitems = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1028 for itm in self.statusList.selectedItems():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1029 if itm.text(self.__changelistColumn) != "":
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1030 clitems.append(itm)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1031 return clitems
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1032
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1033 def __getNonChangelistItems(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1034 """
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
1035 Private method to retrieve all entries, that are not members of
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
1036 a changelist.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1037
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1038 @return list of all items not belonging to a changelist
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1039 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1040 clitems = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1041 for itm in self.statusList.selectedItems():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1042 if itm.text(self.__changelistColumn) == "":
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1043 clitems.append(itm)
889
65585df1d52c Changed the Subversion status dialogs to hide columns with uninteresting information.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
1044 return clitems
1294
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
1045
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
1046 def __commitSelect(self, selected):
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
1047 """
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
1048 Private slot to select or deselect all entries.
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
1049
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
1050 @param selected commit selection state to be set (boolean)
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
1051 """
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
1052 for index in range(self.statusList.topLevelItemCount()):
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
1053 itm = self.statusList.topLevelItem(index)
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
1054 if itm.flags() & Qt.ItemIsUserCheckable:
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
1055 if selected:
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
1056 itm.setCheckState(self.__toBeCommittedColumn, Qt.Checked)
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
1057 else:
d051b9d1426d Added context menu actions to select/deselect all commitable items of the various VCS status dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1268
diff changeset
1058 itm.setCheckState(self.__toBeCommittedColumn, Qt.Unchecked)

eric ide

mercurial