Changed the Mercurial log browser to show incoming/outgoing changesets with the current log (by pressing the next button).

Mon, 27 Dec 2010 19:21:17 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 27 Dec 2010 19:21:17 +0100
changeset 781
2f85b5573e62
parent 777
f0f24d2f9eab
child 782
2c567a5ceade

Changed the Mercurial log browser to show incoming/outgoing changesets with the current log (by pressing the next button).

Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py file | annotate | diff | comparison | revisions
changelog file | annotate | diff | comparison | revisions
--- a/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Mon Dec 27 17:21:59 2010 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Mon Dec 27 19:21:17 2010 +0100
@@ -9,7 +9,7 @@
 
 import os
 
-from PyQt4.QtCore import pyqtSlot, Qt, QDate, QProcess, QTimer, QRegExp, QSize
+from PyQt4.QtCore import pyqtSlot, Qt, QDate, QProcess, QTimer, QRegExp, QSize, QPoint
 from PyQt4.QtGui import QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem, \
     QApplication, QCursor, QWidget, QLineEdit, QColor, QPixmap, \
     QPainter, QPen, QBrush, QIcon
@@ -294,7 +294,16 @@
         pen = QPen(pencolor)
         pen.setWidth(penradius)
         painter.setPen(pen)
-        painter.drawEllipse(dot_x, dot_y, radius, radius)
+        if self.commandMode in ("incoming", "outgoing"):
+            offset = radius // 2
+            painter.drawConvexPolygon(
+                QPoint(dot_x + offset, dot_y), 
+                QPoint(dot_x, dot_y + offset), 
+                QPoint(dot_x + offset, dot_y + 2 * offset), 
+                QPoint(dot_x + 2 * offset, dot_y + offset)
+            )
+        else:
+            painter.drawEllipse(dot_x, dot_y, radius, radius)
         painter.end()
         return QIcon(pix)
     
@@ -697,9 +706,15 @@
             self.logTree.setCurrentItem(self.logTree.topLevelItem(0))
             self.__started = False
         
-        if noEntries < self.limitSpinBox.value() and not self.cancelled:
-            self.nextButton.setEnabled(False)
-            self.limitSpinBox.setEnabled(False)
+        if self.commandMode in ("incoming", "outgoing"):
+            self.commandMode = "log"    # switch to log mode
+            if self.__lastRev > 0:
+                self.nextButton.setEnabled(True)
+                self.limitSpinBox.setEnabled(True)
+        else:
+            if noEntries < self.limitSpinBox.value() and not self.cancelled:
+                self.nextButton.setEnabled(False)
+                self.limitSpinBox.setEnabled(False)
         
         # update the log filters
         self.__filterLogsEnabled = False
--- a/changelog	Mon Dec 27 17:21:59 2010 +0100
+++ b/changelog	Mon Dec 27 19:21:17 2010 +0100
@@ -7,6 +7,8 @@
 - added support for additional configurable file filters
 - added a certificate manager to the eric web browser
 - added display of suppressed client termination messages
+- changed the Mercurial log browser to show incoming/outgoing changesets
+  with the current log (by pressing the next button)
 
 Version 5.1-snapshot-20101029:
 - bug fixes

eric ide

mercurial