eric6/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py

branch
without_py2_and_pyqt4
changeset 7200
ebab8ba287e6
parent 7192
a22eee00b052
parent 7194
b184e8ca7219
child 7201
6b42677d7043
diff -r c71bd6f21748 -r ebab8ba287e6 eric6/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py
--- a/eric6/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Sun Sep 01 19:56:13 2019 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Sun Sep 01 19:58:00 2019 +0200
@@ -1429,6 +1429,19 @@
                     else:
                         self.logTree.setCurrentItem(
                             self.logTree.topLevelItem(0))
+                elif self.__projectWorkingDirParents:
+                    for rev in self.__projectWorkingDirParents:
+                        # rev string format must match with the format of the
+                        # __generateLogItem() method
+                        items = self.logTree.findItems(
+                            "{0:>7}:".format(rev), Qt.MatchStartsWith,
+                            self.RevisionColumn)
+                        if items:
+                            self.logTree.setCurrentItem(items[0])
+                            break
+                    else:
+                        self.logTree.setCurrentItem(
+                            self.logTree.topLevelItem(0))
                 else:
                     self.logTree.setCurrentItem(self.logTree.topLevelItem(0))
                 self.__started = False

eric ide

mercurial