1. toseewhy
  2. thg

Commits

Sune Foldager  committed 6a58c87

repowidget: add "Goto common ancestor" command in pop-up menu

This augments the hidden middle-mouse-button gesture with the same function.

  • Participants
  • Parent commits bea4af3
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/repowidget.py

View file
  • Ignore whitespace
             dlg = compress.CompressDialog(self.repo, revs, self)
             dlg.finished.connect(dlg.deleteLater)
             dlg.exec_()
+        def gotoAncestor():
+            ctxa = self.repo[self.menuselection[0]]
+            ctxb = self.repo[self.menuselection[1]]
+            self.goto(ctxa.ancestor(ctxb).rev())
 
         menu = QMenu(self)
         for name, cb, icon in (
                 (None, None, None),
                 (_('Bisect - Good, Bad...'), bisectNormal, 'hg-bisect-good-bad'),
                 (_('Bisect - Bad, Good...'), bisectReverse, 'hg-bisect-bad-good'),
-                (_('Compress History...'), compressDlg, 'hg-compress')
+                (_('Compress History...'), compressDlg, 'hg-compress'),
+                (None, None, None),
+                (_('Goto common ancestor'), gotoAncestor, 'hg-merge')
                 ):
             if name is None:
                 menu.addSeparator()