Wed, 19 Feb 2014 19:45:06 +0100
Changed the Subversion Log Browser dialogs to maintain its position after being closed and fixed a few issues in the Mercurial log browser.
--- a/APIs/Python3/eric5.api Tue Feb 18 19:25:24 2014 +0100 +++ b/APIs/Python3/eric5.api Wed Feb 19 19:45:06 2014 +0100 @@ -5025,6 +5025,7 @@ eric5.Plugins.VcsPlugins.vcsPySvn.SvnInfoDialog.SvnInfoDialog.start?4(projectPath, fn) eric5.Plugins.VcsPlugins.vcsPySvn.SvnInfoDialog.SvnInfoDialog?1(vcs, parent=None) eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.SvnLogBrowserDialog._reset?5() +eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.SvnLogBrowserDialog.closeEvent?4(e) eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.SvnLogBrowserDialog.on_buttonBox_clicked?4(button) eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.SvnLogBrowserDialog.on_diffPreviousButton_clicked?4() eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.SvnLogBrowserDialog.on_diffRevisionsButton_clicked?4() @@ -5036,8 +5037,9 @@ eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.SvnLogBrowserDialog.on_rxEdit_textChanged?4(txt) eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.SvnLogBrowserDialog.on_stopCheckBox_clicked?4(checked) eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.SvnLogBrowserDialog.on_toDate_dateChanged?4(date) -eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.SvnLogBrowserDialog.start?4(fn) -eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.SvnLogBrowserDialog?1(vcs, isFile=False, parent=None) +eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.SvnLogBrowserDialog.show?4() +eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.SvnLogBrowserDialog.start?4(fn, isFile=False) +eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.SvnLogBrowserDialog?1(vcs, parent=None) eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogDialog.SvnLogDialog.on_buttonBox_clicked?4(button) eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogDialog.SvnLogDialog.start?4(fn, noEntries=0) eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogDialog.SvnLogDialog?1(vcs, isFile=False, parent=None) @@ -5265,8 +5267,9 @@ eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.SvnLogBrowserDialog.on_sendButton_clicked?4() eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.SvnLogBrowserDialog.on_stopCheckBox_clicked?4(checked) eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.SvnLogBrowserDialog.on_toDate_dateChanged?4(date) -eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.SvnLogBrowserDialog.start?4(fn) -eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.SvnLogBrowserDialog?1(vcs, isFile=False, parent=None) +eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.SvnLogBrowserDialog.show?4() +eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.SvnLogBrowserDialog.start?4(fn, isFile=False) +eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.SvnLogBrowserDialog?1(vcs, parent=None) eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogDialog.SvnLogDialog.closeEvent?4(e) eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogDialog.SvnLogDialog.keyPressEvent?4(evt) eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogDialog.SvnLogDialog.on_input_returnPressed?4()
--- a/Documentation/Help/source.qhp Tue Feb 18 19:25:24 2014 +0100 +++ b/Documentation/Help/source.qhp Wed Feb 19 19:45:06 2014 +0100 @@ -10651,10 +10651,14 @@ <keyword name="SvnLogBrowserDialog.__generateLogItem" id="SvnLogBrowserDialog.__generateLogItem" ref="eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html#SvnLogBrowserDialog.__generateLogItem" /> <keyword name="SvnLogBrowserDialog.__getLogEntries" id="SvnLogBrowserDialog.__getLogEntries" ref="eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.html#SvnLogBrowserDialog.__getLogEntries" /> <keyword name="SvnLogBrowserDialog.__getLogEntries" id="SvnLogBrowserDialog.__getLogEntries" ref="eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html#SvnLogBrowserDialog.__getLogEntries" /> + <keyword name="SvnLogBrowserDialog.__initData" id="SvnLogBrowserDialog.__initData" ref="eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.html#SvnLogBrowserDialog.__initData" /> + <keyword name="SvnLogBrowserDialog.__initData" id="SvnLogBrowserDialog.__initData" ref="eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html#SvnLogBrowserDialog.__initData" /> <keyword name="SvnLogBrowserDialog.__procFinished" id="SvnLogBrowserDialog.__procFinished" ref="eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html#SvnLogBrowserDialog.__procFinished" /> <keyword name="SvnLogBrowserDialog.__processBuffer" id="SvnLogBrowserDialog.__processBuffer" ref="eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html#SvnLogBrowserDialog.__processBuffer" /> <keyword name="SvnLogBrowserDialog.__readStderr" id="SvnLogBrowserDialog.__readStderr" ref="eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html#SvnLogBrowserDialog.__readStderr" /> <keyword name="SvnLogBrowserDialog.__readStdout" id="SvnLogBrowserDialog.__readStdout" ref="eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html#SvnLogBrowserDialog.__readStdout" /> + <keyword name="SvnLogBrowserDialog.__resetUI" id="SvnLogBrowserDialog.__resetUI" ref="eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.html#SvnLogBrowserDialog.__resetUI" /> + <keyword name="SvnLogBrowserDialog.__resetUI" id="SvnLogBrowserDialog.__resetUI" ref="eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html#SvnLogBrowserDialog.__resetUI" /> <keyword name="SvnLogBrowserDialog.__resizeColumnsFiles" id="SvnLogBrowserDialog.__resizeColumnsFiles" ref="eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.html#SvnLogBrowserDialog.__resizeColumnsFiles" /> <keyword name="SvnLogBrowserDialog.__resizeColumnsFiles" id="SvnLogBrowserDialog.__resizeColumnsFiles" ref="eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html#SvnLogBrowserDialog.__resizeColumnsFiles" /> <keyword name="SvnLogBrowserDialog.__resizeColumnsLog" id="SvnLogBrowserDialog.__resizeColumnsLog" ref="eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.html#SvnLogBrowserDialog.__resizeColumnsLog" /> @@ -10665,6 +10669,7 @@ <keyword name="SvnLogBrowserDialog.__resortLog" id="SvnLogBrowserDialog.__resortLog" ref="eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html#SvnLogBrowserDialog.__resortLog" /> <keyword name="SvnLogBrowserDialog.__showError" id="SvnLogBrowserDialog.__showError" ref="eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.html#SvnLogBrowserDialog.__showError" /> <keyword name="SvnLogBrowserDialog._reset" id="SvnLogBrowserDialog._reset" ref="eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.html#SvnLogBrowserDialog._reset" /> + <keyword name="SvnLogBrowserDialog.closeEvent" id="SvnLogBrowserDialog.closeEvent" ref="eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.html#SvnLogBrowserDialog.closeEvent" /> <keyword name="SvnLogBrowserDialog.closeEvent" id="SvnLogBrowserDialog.closeEvent" ref="eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html#SvnLogBrowserDialog.closeEvent" /> <keyword name="SvnLogBrowserDialog.keyPressEvent" id="SvnLogBrowserDialog.keyPressEvent" ref="eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html#SvnLogBrowserDialog.keyPressEvent" /> <keyword name="SvnLogBrowserDialog.on_buttonBox_clicked" id="SvnLogBrowserDialog.on_buttonBox_clicked" ref="eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.html#SvnLogBrowserDialog.on_buttonBox_clicked" /> @@ -10692,6 +10697,8 @@ <keyword name="SvnLogBrowserDialog.on_stopCheckBox_clicked" id="SvnLogBrowserDialog.on_stopCheckBox_clicked" ref="eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html#SvnLogBrowserDialog.on_stopCheckBox_clicked" /> <keyword name="SvnLogBrowserDialog.on_toDate_dateChanged" id="SvnLogBrowserDialog.on_toDate_dateChanged" ref="eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.html#SvnLogBrowserDialog.on_toDate_dateChanged" /> <keyword name="SvnLogBrowserDialog.on_toDate_dateChanged" id="SvnLogBrowserDialog.on_toDate_dateChanged" ref="eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html#SvnLogBrowserDialog.on_toDate_dateChanged" /> + <keyword name="SvnLogBrowserDialog.show" id="SvnLogBrowserDialog.show" ref="eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.html#SvnLogBrowserDialog.show" /> + <keyword name="SvnLogBrowserDialog.show" id="SvnLogBrowserDialog.show" ref="eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html#SvnLogBrowserDialog.show" /> <keyword name="SvnLogBrowserDialog.start" id="SvnLogBrowserDialog.start" ref="eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.html#SvnLogBrowserDialog.start" /> <keyword name="SvnLogBrowserDialog.start" id="SvnLogBrowserDialog.start" ref="eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html#SvnLogBrowserDialog.start" /> <keyword name="SvnLogDialog" id="SvnLogDialog" ref="eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogDialog.html#SvnLogDialog" />
--- a/Documentation/Source/eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.html Tue Feb 18 19:25:24 2014 +0100 +++ b/Documentation/Source/eric5.Plugins.VcsPlugins.vcsPySvn.SvnLogBrowserDialog.html Wed Feb 19 19:45:06 2014 +0100 @@ -78,6 +78,12 @@ <td><a href="#SvnLogBrowserDialog.__getLogEntries">__getLogEntries</a></td> <td>Private method to retrieve log entries from the repository.</td> </tr><tr> +<td><a href="#SvnLogBrowserDialog.__initData">__initData</a></td> +<td>Private method to (re-)initialize some data.</td> +</tr><tr> +<td><a href="#SvnLogBrowserDialog.__resetUI">__resetUI</a></td> +<td>Private method to reset the user interface.</td> +</tr><tr> <td><a href="#SvnLogBrowserDialog.__resizeColumnsFiles">__resizeColumnsFiles</a></td> <td>Private method to resize the changed files tree columns.</td> </tr><tr> @@ -96,6 +102,9 @@ <td><a href="#SvnLogBrowserDialog._reset">_reset</a></td> <td>Protected method to reset the internal state of the dialog.</td> </tr><tr> +<td><a href="#SvnLogBrowserDialog.closeEvent">closeEvent</a></td> +<td>Private slot implementing a close event handler.</td> +</tr><tr> <td><a href="#SvnLogBrowserDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> <td>Private slot called by a button of the button box clicked.</td> </tr><tr> @@ -129,6 +138,9 @@ <td><a href="#SvnLogBrowserDialog.on_toDate_dateChanged">on_toDate_dateChanged</a></td> <td>Private slot called, when the from date changes.</td> </tr><tr> +<td><a href="#SvnLogBrowserDialog.show">show</a></td> +<td>Public slot to show the dialog.</td> +</tr><tr> <td><a href="#SvnLogBrowserDialog.start">start</a></td> <td>Public slot to start the svn log command.</td> </tr> @@ -139,16 +151,13 @@ </table> <a NAME="SvnLogBrowserDialog.__init__" ID="SvnLogBrowserDialog.__init__"></a> <h4>SvnLogBrowserDialog (Constructor)</h4> -<b>SvnLogBrowserDialog</b>(<i>vcs, isFile=False, parent=None</i>) +<b>SvnLogBrowserDialog</b>(<i>vcs, parent=None</i>) <p> Constructor </p><dl> <dt><i>vcs</i></dt> <dd> reference to the vcs object -</dd><dt><i>isFile</i></dt> -<dd> -flag indicating log for a file is to be shown (boolean) </dd><dt><i>parent</i></dt> <dd> parent widget (QWidget) @@ -241,7 +250,17 @@ <dd> revision number to start from (integer, string) </dd> -</dl><a NAME="SvnLogBrowserDialog.__resizeColumnsFiles" ID="SvnLogBrowserDialog.__resizeColumnsFiles"></a> +</dl><a NAME="SvnLogBrowserDialog.__initData" ID="SvnLogBrowserDialog.__initData"></a> +<h4>SvnLogBrowserDialog.__initData</h4> +<b>__initData</b>(<i></i>) +<p> + Private method to (re-)initialize some data. +</p><a NAME="SvnLogBrowserDialog.__resetUI" ID="SvnLogBrowserDialog.__resetUI"></a> +<h4>SvnLogBrowserDialog.__resetUI</h4> +<b>__resetUI</b>(<i></i>) +<p> + Private method to reset the user interface. +</p><a NAME="SvnLogBrowserDialog.__resizeColumnsFiles" ID="SvnLogBrowserDialog.__resizeColumnsFiles"></a> <h4>SvnLogBrowserDialog.__resizeColumnsFiles</h4> <b>__resizeColumnsFiles</b>(<i></i>) <p> @@ -276,7 +295,17 @@ <b>_reset</b>(<i></i>) <p> Protected method to reset the internal state of the dialog. -</p><a NAME="SvnLogBrowserDialog.on_buttonBox_clicked" ID="SvnLogBrowserDialog.on_buttonBox_clicked"></a> +</p><a NAME="SvnLogBrowserDialog.closeEvent" ID="SvnLogBrowserDialog.closeEvent"></a> +<h4>SvnLogBrowserDialog.closeEvent</h4> +<b>closeEvent</b>(<i>e</i>) +<p> + Private slot implementing a close event handler. +</p><dl> +<dt><i>e</i></dt> +<dd> +close event (QCloseEvent) +</dd> +</dl><a NAME="SvnLogBrowserDialog.on_buttonBox_clicked" ID="SvnLogBrowserDialog.on_buttonBox_clicked"></a> <h4>SvnLogBrowserDialog.on_buttonBox_clicked</h4> <b>on_buttonBox_clicked</b>(<i>button</i>) <p> @@ -369,15 +398,23 @@ <dd> new date (QDate) </dd> -</dl><a NAME="SvnLogBrowserDialog.start" ID="SvnLogBrowserDialog.start"></a> +</dl><a NAME="SvnLogBrowserDialog.show" ID="SvnLogBrowserDialog.show"></a> +<h4>SvnLogBrowserDialog.show</h4> +<b>show</b>(<i></i>) +<p> + Public slot to show the dialog. +</p><a NAME="SvnLogBrowserDialog.start" ID="SvnLogBrowserDialog.start"></a> <h4>SvnLogBrowserDialog.start</h4> -<b>start</b>(<i>fn</i>) +<b>start</b>(<i>fn, isFile=False</i>) <p> Public slot to start the svn log command. </p><dl> <dt><i>fn</i></dt> <dd> filename to show the log for (string) +</dd><dt><i>isFile=</i></dt> +<dd> +flag indicating log for a file is to be shown (boolean) </dd> </dl> <div align="right"><a href="#top">Up</a></div>
--- a/Documentation/Source/eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html Tue Feb 18 19:25:24 2014 +0100 +++ b/Documentation/Source/eric5.Plugins.VcsPlugins.vcsSubversion.SvnLogBrowserDialog.html Wed Feb 19 19:45:06 2014 +0100 @@ -78,6 +78,9 @@ <td><a href="#SvnLogBrowserDialog.__getLogEntries">__getLogEntries</a></td> <td>Private method to retrieve log entries from the repository.</td> </tr><tr> +<td><a href="#SvnLogBrowserDialog.__initData">__initData</a></td> +<td>Private method to (re-)initialize some data.</td> +</tr><tr> <td><a href="#SvnLogBrowserDialog.__procFinished">__procFinished</a></td> <td>Private slot connected to the finished signal.</td> </tr><tr> @@ -90,6 +93,9 @@ <td><a href="#SvnLogBrowserDialog.__readStdout">__readStdout</a></td> <td>Private slot to handle the readyReadStandardOutput signal.</td> </tr><tr> +<td><a href="#SvnLogBrowserDialog.__resetUI">__resetUI</a></td> +<td>Private method to reset the user interface.</td> +</tr><tr> <td><a href="#SvnLogBrowserDialog.__resizeColumnsFiles">__resizeColumnsFiles</a></td> <td>Private method to resize the changed files tree columns.</td> </tr><tr> @@ -150,6 +156,9 @@ <td><a href="#SvnLogBrowserDialog.on_toDate_dateChanged">on_toDate_dateChanged</a></td> <td>Private slot called, when the from date changes.</td> </tr><tr> +<td><a href="#SvnLogBrowserDialog.show">show</a></td> +<td>Public slot to show the dialog.</td> +</tr><tr> <td><a href="#SvnLogBrowserDialog.start">start</a></td> <td>Public slot to start the svn log command.</td> </tr> @@ -160,16 +169,13 @@ </table> <a NAME="SvnLogBrowserDialog.__init__" ID="SvnLogBrowserDialog.__init__"></a> <h4>SvnLogBrowserDialog (Constructor)</h4> -<b>SvnLogBrowserDialog</b>(<i>vcs, isFile=False, parent=None</i>) +<b>SvnLogBrowserDialog</b>(<i>vcs, parent=None</i>) <p> Constructor </p><dl> <dt><i>vcs</i></dt> <dd> reference to the vcs object -</dd><dt><i>isFile</i></dt> -<dd> -flag indicating log for a file is to be shown (boolean) </dd><dt><i>parent</i></dt> <dd> parent widget (QWidget) @@ -260,7 +266,12 @@ <dd> revision number to start from (integer, string) </dd> -</dl><a NAME="SvnLogBrowserDialog.__procFinished" ID="SvnLogBrowserDialog.__procFinished"></a> +</dl><a NAME="SvnLogBrowserDialog.__initData" ID="SvnLogBrowserDialog.__initData"></a> +<h4>SvnLogBrowserDialog.__initData</h4> +<b>__initData</b>(<i></i>) +<p> + Private method to (re-)initialize some data. +</p><a NAME="SvnLogBrowserDialog.__procFinished" ID="SvnLogBrowserDialog.__procFinished"></a> <h4>SvnLogBrowserDialog.__procFinished</h4> <b>__procFinished</b>(<i>exitCode, exitStatus</i>) <p> @@ -293,6 +304,11 @@ Private slot to handle the readyReadStandardOutput signal. </p><p> It reads the output of the process and inserts it into a buffer. +</p><a NAME="SvnLogBrowserDialog.__resetUI" ID="SvnLogBrowserDialog.__resetUI"></a> +<h4>SvnLogBrowserDialog.__resetUI</h4> +<b>__resetUI</b>(<i></i>) +<p> + Private method to reset the user interface. </p><a NAME="SvnLogBrowserDialog.__resizeColumnsFiles" ID="SvnLogBrowserDialog.__resizeColumnsFiles"></a> <h4>SvnLogBrowserDialog.__resizeColumnsFiles</h4> <b>__resizeColumnsFiles</b>(<i></i>) @@ -446,15 +462,23 @@ <dd> new date (QDate) </dd> -</dl><a NAME="SvnLogBrowserDialog.start" ID="SvnLogBrowserDialog.start"></a> +</dl><a NAME="SvnLogBrowserDialog.show" ID="SvnLogBrowserDialog.show"></a> +<h4>SvnLogBrowserDialog.show</h4> +<b>show</b>(<i></i>) +<p> + Public slot to show the dialog. +</p><a NAME="SvnLogBrowserDialog.start" ID="SvnLogBrowserDialog.start"></a> <h4>SvnLogBrowserDialog.start</h4> -<b>start</b>(<i>fn</i>) +<b>start</b>(<i>fn, isFile=False</i>) <p> Public slot to start the svn log command. </p><dl> <dt><i>fn</i></dt> <dd> filename to show the log for (string) +</dd><dt><i>isFile=</i></dt> +<dd> +flag indicating log for a file is to be shown (boolean) </dd> </dl> <div align="right"><a href="#top">Up</a></div>
--- a/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py Tue Feb 18 19:25:24 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py Wed Feb 19 19:45:06 2014 +0100 @@ -80,27 +80,20 @@ self.initialCommandMode = mode else: self.commandMode = "log" - self.bundle = "" + self.initialCommandMode = "log" self.__hgClient = vcs.getClient() + self.__bundle = "" + self.__filename = "" + self.__isFile = False + self.__initData() self.__allBranchesFilter = self.tr("All") self.fromDate.setDisplayFormat("yyyy-MM-dd") self.toDate.setDisplayFormat("yyyy-MM-dd") - self.fromDate.setDate(QDate.currentDate()) - self.toDate.setDate(QDate.currentDate()) - self.fieldCombo.setCurrentIndex(self.fieldCombo.findText( - self.tr("Message"))) - self.limitSpinBox.setValue(self.vcs.getPlugin().getPreferences( - "LogLimit")) - self.stopCheckBox.setChecked(self.vcs.getPlugin().getPreferences( - "StopLogOnCopy")) - - if mode in ("incoming", "outgoing"): - self.nextButton.setEnabled(False) - self.limitSpinBox.setEnabled(False) + self.__resetUI() self.__messageRole = Qt.UserRole self.__changesRole = Qt.UserRole + 1 @@ -237,11 +230,13 @@ if self.initialCommandMode in ("incoming", "outgoing"): self.nextButton.setEnabled(False) self.limitSpinBox.setEnabled(False) + else: + self.nextButton.setEnabled(True) + self.limitSpinBox.setEnabled(True) self.logTree.clear() self.commandMode = self.initialCommandMode - def __resizeColumnsLog(self): """ @@ -445,9 +440,9 @@ args = [] args.append("parents") if self.commandMode == "incoming": - if self.bundle: + if self.__bundle: args.append("--repository") - args.append(self.bundle) + args.append(self.__bundle) elif self.vcs.bundleFile and \ os.path.exists(self.vcs.bundleFile): args.append("--repository") @@ -457,7 +452,7 @@ args.append("-r") args.append(rev) if not self.projectMode: - args.append(self.filename) + args.append(self.__filename) output = "" if self.__hgClient: @@ -738,8 +733,8 @@ "styles", "logBrowser.style")) if self.commandMode == "incoming": - if self.bundle: - args.append(self.bundle) + if self.__bundle: + args.append(self.__bundle) elif not self.vcs.hasSubrepositories(): project = e5App().getObject("Project") self.vcs.bundleFile = os.path.join( @@ -752,7 +747,7 @@ preargs.append(self.vcs.bundleFile) args.append(self.vcs.bundleFile) if not self.projectMode: - args.append(self.filename) + args.append(self.__filename) if self.__hgClient: self.inputGroup.setEnabled(False) @@ -767,7 +762,7 @@ elif self.commandMode != "incoming" or \ (self.vcs.bundleFile and os.path.exists(self.vcs.bundleFile)) or \ - self.bundle: + self.__bundle: out, err = self.__hgClient.runcommand(args) self.buf = out.splitlines(True) if err: @@ -791,7 +786,7 @@ process.waitForFinished(30000) if self.vcs.bundleFile and os.path.exists(self.vcs.bundleFile) or \ - self.bundle: + self.__bundle: self.process.start('hg', args) procStarted = self.process.waitForStarted(5000) if not procStarted: @@ -816,7 +811,8 @@ @keyparam isFile flag indicating log for a file is to be shown (boolean) """ - self.bundle = bundle + self.__bundle = bundle + self.__isFile = isFile self.sbsCheckBox.setEnabled(isFile) self.sbsCheckBox.setVisible(isFile) @@ -826,7 +822,7 @@ self.__initData() - self.filename = fn + self.__filename = fn self.dname, self.fname = self.vcs.splitPath(fn) # find the root of the repo @@ -1066,14 +1062,15 @@ @param rev2 second revision number (integer) """ if self.sbsCheckBox.isEnabled() and self.sbsCheckBox.isChecked(): - self.vcs.hgSbsDiff(self.filename, revisions=(str(rev1), str(rev2))) + self.vcs.hgSbsDiff(self.__filename, + revisions=(str(rev1), str(rev2))) else: if self.diff is None: from .HgDiffDialog import HgDiffDialog self.diff = HgDiffDialog(self.vcs) self.diff.show() self.diff.raise_() - self.diff.start(self.filename, [rev1, rev2], self.bundle) + self.diff.start(self.__filename, [rev1, rev2], self.__bundle) def on_buttonBox_clicked(self, button): """ @@ -1387,10 +1384,15 @@ self.inputGroup.show() self.refreshButton.setEnabled(False) - self.__initData() + if self.initialCommandMode in ("incoming", "outgoing"): + self.nextButton.setEnabled(False) + self.limitSpinBox.setEnabled(False) + else: + self.nextButton.setEnabled(True) + self.limitSpinBox.setEnabled(True) self.commandMode = self.initialCommandMode - self.start(self.filename) + self.start(self.__filename, isFile=self.__isFile) def on_passwordCheckBox_toggled(self, isOn): """
--- a/Plugins/VcsPlugins/vcsPySvn/SvnLogBrowserDialog.py Tue Feb 18 19:25:24 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnLogBrowserDialog.py Wed Feb 19 19:45:06 2014 +0100 @@ -11,7 +11,7 @@ import pysvn -from PyQt4.QtCore import QMutexLocker, QDate, QRegExp, Qt, pyqtSlot +from PyQt4.QtCore import QMutexLocker, QDate, QRegExp, Qt, pyqtSlot, QPoint from PyQt4.QtGui import QCursor, QHeaderView, QWidget, QApplication, \ QDialogButtonBox, QTreeWidgetItem @@ -27,43 +27,32 @@ """ Class implementing a dialog to browse the log history. """ - def __init__(self, vcs, isFile=False, parent=None): + def __init__(self, vcs, parent=None): """ Constructor @param vcs reference to the vcs object - @param isFile flag indicating log for a file is to be shown (boolean) @param parent parent widget (QWidget) """ super().__init__(parent) self.setupUi(self) SvnDialogMixin.__init__(self) + self.__position = QPoint() + self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) self.filesTree.headerItem().setText(self.filesTree.columnCount(), "") self.filesTree.header().setSortIndicator(0, Qt.AscendingOrder) - self.sbsCheckBox.setEnabled(isFile) - self.sbsCheckBox.setVisible(isFile) - self.vcs = vcs - self.__maxDate = QDate() - self.__minDate = QDate() - self.__filterLogsEnabled = True + self.__initData() self.fromDate.setDisplayFormat("yyyy-MM-dd") self.toDate.setDisplayFormat("yyyy-MM-dd") - self.fromDate.setDate(QDate.currentDate()) - self.toDate.setDate(QDate.currentDate()) - self.fieldCombo.setCurrentIndex( - self.fieldCombo.findText(self.tr("Message"))) - self.limitSpinBox.setValue( - self.vcs.getPlugin().getPreferences("LogLimit")) - self.stopCheckBox.setChecked( - self.vcs.getPlugin().getPreferences("StopLogOnCopy")) + self.__resetUI() self.__messageRole = Qt.UserRole self.__changesRole = Qt.UserRole + 1 @@ -75,9 +64,6 @@ 'R': self.tr('Replaced'), } - self.diff = None - self.__lastRev = 0 - self.client = self.vcs.getClient() self.client.callback_cancel = \ self._clientCancelCallback @@ -86,6 +72,55 @@ self.client.callback_ssl_server_trust_prompt = \ self._clientSslServerTrustPromptCallback + def __initData(self): + """ + Private method to (re-)initialize some data. + """ + self.__maxDate = QDate() + self.__minDate = QDate() + self.__filterLogsEnabled = True + + self.diff = None + self.__lastRev = 0 + + def closeEvent(self, e): + """ + Private slot implementing a close event handler. + + @param e close event (QCloseEvent) + """ + self.__position = self.pos() + + e.accept() + + def show(self): + """ + Public slot to show the dialog. + """ + if not self.__position.isNull(): + self.move(self.__position) + self.__resetUI() + + super().show() + + def __resetUI(self): + """ + Private method to reset the user interface. + """ + self.fromDate.setDate(QDate.currentDate()) + self.toDate.setDate(QDate.currentDate()) + self.fieldCombo.setCurrentIndex(self.fieldCombo.findText( + self.tr("Message"))) + self.limitSpinBox.setValue(self.vcs.getPlugin().getPreferences( + "LogLimit")) + self.stopCheckBox.setChecked(self.vcs.getPlugin().getPreferences( + "StopLogOnCopy")) + + self.logTree.clear() + + self.nextButton.setEnabled(True) + self.limitSpinBox.setEnabled(True) + def _reset(self): """ Protected method to reset the internal state of the dialog. @@ -292,12 +327,18 @@ os.chdir(cwd) self.__finish() - def start(self, fn): + def start(self, fn, isFile=False): """ Public slot to start the svn log command. @param fn filename to show the log for (string) + @keyparam isFile flag indicating log for a file is to be shown (boolean) """ + self.sbsCheckBox.setEnabled(isFile) + self.sbsCheckBox.setVisible(isFile) + + self.__initData() + self.filename = fn self.dname, self.fname = self.vcs.splitPath(fn) @@ -360,17 +401,18 @@ @param current reference to the new current item (QTreeWidgetItem) @param previous reference to the old current item (QTreeWidgetItem) """ - self.messageEdit.setPlainText(current.data(0, self.__messageRole)) - - self.filesTree.clear() - changes = current.data(0, self.__changesRole) - if len(changes) > 0: - for change in changes: - self.__generateFileItem( - change["action"], change["path"], - change["copyfrom_path"], change["copyfrom_revision"]) - self.__resizeColumnsFiles() - self.__resortFiles() + if current is not None: + self.messageEdit.setPlainText(current.data(0, self.__messageRole)) + + self.filesTree.clear() + changes = current.data(0, self.__changesRole) + if len(changes) > 0: + for change in changes: + self.__generateFileItem( + change["action"], change["path"], + change["copyfrom_path"], change["copyfrom_revision"]) + self.__resizeColumnsFiles() + self.__resortFiles() self.diffPreviousButton.setEnabled( current != self.logTree.topLevelItem(
--- a/Plugins/VcsPlugins/vcsPySvn/subversion.py Tue Feb 18 19:25:24 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/subversion.py Wed Feb 19 19:45:06 2014 +0100 @@ -2209,11 +2209,12 @@ @param path file/directory name to show the log of (string) @param isFile flag indicating log for a file is to be shown (boolean) """ - from .SvnLogBrowserDialog import SvnLogBrowserDialog - self.logBrowser = SvnLogBrowserDialog(self, isFile=isFile) + if self.logBrowser is None: + from .SvnLogBrowserDialog import SvnLogBrowserDialog + self.logBrowser = SvnLogBrowserDialog(self) self.logBrowser.show() QApplication.processEvents() - self.logBrowser.start(path) + self.logBrowser.start(path, isFile=isFile) def svnLock(self, name, stealIt=False, parent=None): """
--- a/Plugins/VcsPlugins/vcsSubversion/SvnLogBrowserDialog.py Tue Feb 18 19:25:24 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnLogBrowserDialog.py Wed Feb 19 19:45:06 2014 +0100 @@ -9,7 +9,8 @@ import os -from PyQt4.QtCore import QTimer, QDate, QProcess, QRegExp, Qt, pyqtSlot +from PyQt4.QtCore import QTimer, QDate, QProcess, QRegExp, Qt, pyqtSlot, \ + QPoint from PyQt4.QtGui import QCursor, QHeaderView, QLineEdit, QWidget, \ QApplication, QDialogButtonBox, QTreeWidgetItem @@ -24,42 +25,31 @@ """ Class implementing a dialog to browse the log history. """ - def __init__(self, vcs, isFile=False, parent=None): + def __init__(self, vcs, parent=None): """ Constructor @param vcs reference to the vcs object - @param isFile flag indicating log for a file is to be shown (boolean) @param parent parent widget (QWidget) """ super().__init__(parent) self.setupUi(self) + self.__position = QPoint() + self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) self.filesTree.headerItem().setText(self.filesTree.columnCount(), "") self.filesTree.header().setSortIndicator(0, Qt.AscendingOrder) - self.sbsCheckBox.setEnabled(isFile) - self.sbsCheckBox.setVisible(isFile) - self.vcs = vcs - self.__maxDate = QDate() - self.__minDate = QDate() - self.__filterLogsEnabled = True + self.__initData() self.fromDate.setDisplayFormat("yyyy-MM-dd") self.toDate.setDisplayFormat("yyyy-MM-dd") - self.fromDate.setDate(QDate.currentDate()) - self.toDate.setDate(QDate.currentDate()) - self.fieldCombo.setCurrentIndex( - self.fieldCombo.findText(self.tr("Message"))) - self.limitSpinBox.setValue( - self.vcs.getPlugin().getPreferences("LogLimit")) - self.stopCheckBox.setChecked( - self.vcs.getPlugin().getPreferences("StopLogOnCopy")) + self.__resetUI() self.__messageRole = Qt.UserRole self.__changesRole = Qt.UserRole + 1 @@ -94,6 +84,14 @@ 'M': self.tr('Modified'), 'R': self.tr('Replaced'), } + + def __initData(self): + """ + Private method to (re-)initialize some data. + """ + self.__maxDate = QDate() + self.__minDate = QDate() + self.__filterLogsEnabled = True self.buf = [] # buffer for stdout self.diff = None @@ -112,8 +110,38 @@ QTimer.singleShot(2000, self.process.kill) self.process.waitForFinished(3000) + self.__position = self.pos() + e.accept() + def show(self): + """ + Public slot to show the dialog. + """ + if not self.__position.isNull(): + self.move(self.__position) + self.__resetUI() + + super().show() + + def __resetUI(self): + """ + Private method to reset the user interface. + """ + self.fromDate.setDate(QDate.currentDate()) + self.toDate.setDate(QDate.currentDate()) + self.fieldCombo.setCurrentIndex(self.fieldCombo.findText( + self.tr("Message"))) + self.limitSpinBox.setValue(self.vcs.getPlugin().getPreferences( + "LogLimit")) + self.stopCheckBox.setChecked(self.vcs.getPlugin().getPreferences( + "StopLogOnCopy")) + + self.logTree.clear() + + self.nextButton.setEnabled(True) + self.limitSpinBox.setEnabled(True) + def __resizeColumnsLog(self): """ Private method to resize the log tree columns. @@ -258,15 +286,21 @@ 'Ensure, that it is in the search path.' ).format('svn')) - def start(self, fn): + def start(self, fn, isFile=False): """ Public slot to start the svn log command. @param fn filename to show the log for (string) + @keyparam isFile flag indicating log for a file is to be shown (boolean) """ + self.sbsCheckBox.setEnabled(isFile) + self.sbsCheckBox.setVisible(isFile) + self.errorGroup.hide() QApplication.processEvents() + self.__initData() + self.filename = fn self.dname, self.fname = self.vcs.splitPath(fn) @@ -457,18 +491,20 @@ @param current reference to the new current item (QTreeWidgetItem) @param previous reference to the old current item (QTreeWidgetItem) """ - self.messageEdit.clear() - for line in current.data(0, self.__messageRole): - self.messageEdit.append(line.strip()) - - self.filesTree.clear() - changes = current.data(0, self.__changesRole) - if len(changes) > 0: - for change in changes: - self.__generateFileItem( - change["action"], change["path"], change["copyfrom_path"], - change["copyfrom_revision"]) - self.__resizeColumnsFiles() + if current is not None: + self.messageEdit.clear() + for line in current.data(0, self.__messageRole): + self.messageEdit.append(line.strip()) + + self.filesTree.clear() + changes = current.data(0, self.__changesRole) + if len(changes) > 0: + for change in changes: + self.__generateFileItem( + change["action"], change["path"], + change["copyfrom_path"], + change["copyfrom_revision"]) + self.__resizeColumnsFiles() self.__resortFiles() self.diffPreviousButton.setEnabled(
--- a/Plugins/VcsPlugins/vcsSubversion/subversion.py Tue Feb 18 19:25:24 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/subversion.py Wed Feb 19 19:45:06 2014 +0100 @@ -95,6 +95,7 @@ self.tagbranchList = None self.blame = None self.repoBrowser = None + self.logBrowser = None # regular expression object for evaluation of the status output self.rx_status1 = QRegExp( @@ -136,6 +137,8 @@ self.blame.close() if self.repoBrowser is not None: self.repoBrowser.close() + if self.logBrowser is not None: + self.logBrowser.close() def vcsExists(self): """ @@ -2037,10 +2040,11 @@ @param path file/directory name to show the log of (string) @param isFile flag indicating log for a file is to be shown (boolean) """ - from .SvnLogBrowserDialog import SvnLogBrowserDialog - self.logBrowser = SvnLogBrowserDialog(self, isFile=isFile) + if self.logBrowser is None: + from .SvnLogBrowserDialog import SvnLogBrowserDialog + self.logBrowser = SvnLogBrowserDialog(self) self.logBrowser.show() - self.logBrowser.start(path) + self.logBrowser.start(path, isFile=isFile) def svnLock(self, name, stealIt=False, parent=None): """