1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Angel Ezquerra  committed 25b0426

filedialogs: add 'Show Revision Details' to revision context menu

  • Participants
  • Parent commits 8695914
  • Branches default

Comments (0)

Files changed (1)

File tortoisehg/hgqt/filedialogs.py

View file
         self._readSettings()
         self.menu = None
         self.dualmenu = None
+        self.revdetails = None
 
     def closeEvent(self, event):
         self._writeSettings()
             a = menu.addAction(_('&Revert to Revision...'))
             a.setIcon(qtlib.getmenuicon('hg-revert'))
             a.triggered.connect(self.onRevertFileToRevision)
+            menu.addSeparator()
+            a = menu.addAction(_('Show Revision &Details'))
+            a.setIcon(qtlib.getmenuicon('hg-log'))
+            a.triggered.connect(self.onShowRevisionDetails)
         else:
             menu = self.menu
         self.selection = selection
         else:
             qtlib.savefiles(self.repo, files, rev, parent=self)
 
+    def onShowRevisionDetails(self):
+        rev = self.selection[0]
+        if not self.revdetails:
+            from tortoisehg.hgqt.revdetails import RevDetailsDialog
+            self.revdetails = RevDetailsDialog(self.repo, rev=rev)
+        else:
+            self.revdetails.setRev(rev)
+        self.revdetails.show()
+        self.revdetails.raise_()
+
     @pyqtSlot(QString)
     def onLinkActivated(self, link):
         link = unicode(link)