Enhanced the Mercurial log browser a little bit.

Sat, 15 Nov 2014 19:59:18 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 15 Nov 2014 19:59:18 +0100
changeset 3927
3e1dc0fb26ed
parent 3926
6492acd0a352
child 3928
d4a1565709c2

Enhanced the Mercurial log browser a little bit.

Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py file | annotate | diff | comparison | revisions
diff -r 6492acd0a352 -r 3e1dc0fb26ed Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py
--- a/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Sat Nov 15 15:57:33 2014 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Sat Nov 15 19:59:18 2014 +0100
@@ -110,6 +110,7 @@
         self.__bundle = ""
         self.__filename = ""
         self.__isFile = False
+        self.__currentRevision = ""
         
         self.__initData()
         
@@ -1054,6 +1055,14 @@
         
         self.__updateDiffButtons()
         self.__updateToolMenuActions()
+        
+        # restore current item
+        if self.__currentRevision:
+            items = self.logTree.findItems(
+                self.__currentRevision, Qt.MatchExactly, self.RevisionColumn)
+            if items:
+                self.logTree.setCurrentItem(items[0])
+                self.__currentRevision = ""
     
     def __readStdout(self):
         """
@@ -1441,6 +1450,13 @@
         self.inputGroup.show()
         self.refreshButton.setEnabled(False)
         
+        # save the current items commit ID
+        itm = self.logTree.currentItem()
+        if itm is not None:
+            self.__currentRevision = itm.text(self.RevisionColumn)
+        else:
+            self.__currentRevision = ""
+        
         if self.initialCommandMode in ("incoming", "outgoing"):
             self.nextButton.setEnabled(False)
             self.limitSpinBox.setEnabled(False)

eric ide

mercurial