Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

repowidget: begin implementing two-revision context menu

Changeset 2f8c85f23c32

Parent 7ce370df6b14

by Steve Borho

Changes to one file · Browse files at 2f8c85f23c32 Showing diff from parent 7ce370df6b14 Diff from another changeset...

 
46
47
48
 
 
49
50
51
 
737
738
739
740
 
741
742
743
 
778
779
780
781
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
782
783
784
 
46
47
48
49
50
51
52
53
 
739
740
741
 
742
743
744
745
 
780
781
782
 
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
@@ -46,6 +46,8 @@
  """Emitted when changed the expected title for the RepoWidget tab"""     singlecmenu = None + paircmenu = None + multicmenu = None     def __init__(self, repo, workbench):   QWidget.__init__(self, acceptDrops=True) @@ -737,7 +739,7 @@
  'qdelete', 'strip']],   ['reviewboard', ['postreview']]]   - exs = self.repo.extensions() + exs = self.repo.extensions()   for ext, actions in allactions:   if ext is None or ext in exs:   for act in actions: @@ -778,7 +780,42 @@
  self.singlecmenu.exec_(point)     def doubleSelectionMenu(self, point, selection): - pass + revA, revB = selection + + def exportPair(): + pass + def exportDagRange(): + pass + def emailPair(): + pass + def emailDagRange(): + pass + def bisectNormal(): + opts = {'good':str(revA), 'bad':str(revB)} + dlg = bisect.BisectDialog(self.repo, opts, self) + dlg.finished.connect(dlg.deleteLater) + dlg.exec_() + def bisectReverse(): + opts = {'good':str(revB), 'bad':str(revA)} + dlg = bisect.BisectDialog(self.repo, opts, self) + dlg.finished.connect(dlg.deleteLater) + dlg.exec_() + + if not self.paircmenu: + menu = QMenu(self) + for name, cb in ( + ('Export Pair', exportPair), + ('Email Pair', emailPair), + ('Export DAG Range', exportDagRange), + ('Email DAG Range', emailDagRange), + ('Bisect - Good, Bad', bisectNormal), + ('Bisect - Bad, Good', bisectReverse), + ): + a = QAction(name, self) + a.triggered.connect(cb) + menu.addAction(a) + self.paircmenu = menu + self.paircmenu.exec_(point)     def multipleSelectionMenu(self, point, selection):   pass