Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

history: add bisect support

Addresses #696

Changeset c1cc263fdc53

Parent 07b08e3d9b5b

by Emmanuel Rosa

Changes to one file · Browse files at c1cc263fdc53 Showing diff from parent 07b08e3d9b5b Diff from another changeset...

 
16
17
18
 
19
20
21
 
752
753
754
 
 
755
756
757
 
798
799
800
 
 
 
 
 
 
 
 
801
802
803
 
1778
1779
1780
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1781
1782
1783
 
16
17
18
19
20
21
22
 
753
754
755
756
757
758
759
760
 
801
802
803
804
805
806
807
808
809
810
811
812
813
814
 
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
@@ -16,6 +16,7 @@
 import atexit    from mercurial import ui, hg, cmdutil, commands, extensions, util, match, url +from mercurial import hbisect    from tortoisehg.util.i18n import _  from tortoisehg.util import hglib, thread2 @@ -752,6 +753,8 @@
  m.append(create_submenu(_('Mercurial Queues...'),   self.mq_context_menu()))   + m.append(create_submenu(_('Bisect...'), + self.bisect_context_menu()))   menu = m.create_menu()   menu.show_all()   return menu @@ -798,6 +801,14 @@
  m.append(cmenu_strip)   return m.create_menu()   + def bisect_context_menu(self): + m = gtklib.MenuItems() + m.append(create_menu(_('Reset'), self.bisect_reset)) + m.append(create_menu(_('Mark as good'), self.bisect_good)) + m.append(create_menu(_('Mark as bad'), self.bisect_bad)) + m.append(create_menu(_('Skip testing'), self.bisect_skip)) + return m.create_menu() +   def restore_single_sel(self, widget, *args):   self.tree.get_selection().set_mode(gtk.SELECTION_SINGLE)   if self.origsel: @@ -1778,6 +1789,38 @@
  dialog.connect('destroy', refresh)   self.show_dialog(dialog)   + def bisect_reset(self, menuitem): + commands.bisect(ui=self.ui, + repo=self.repo, + good=False, + bad=False, + skip=False, + reset=True) + + def bisect_good(self, menuitem): + cmd = ['hg', 'bisect', '--good', str(self.currevid)] + dlg = hgcmd.CmdDialog(cmd) + dlg.show_all() + dlg.run() + dlg.hide() + self.refresh_model() + + def bisect_bad(self, menuitem): + cmd = ['hg', 'bisect', '--bad', str(self.currevid)] + dlg = hgcmd.CmdDialog(cmd) + dlg.show_all() + dlg.run() + dlg.hide() + self.refresh_model() + + def bisect_skip(self, menuitem): + cmd = ['hg', 'bisect', '--skip', str(self.currevid)] + dlg = hgcmd.CmdDialog(cmd) + dlg.show_all() + dlg.run() + dlg.hide() + self.refresh_model() +   def show_status(self, menuitem):   rev = self.currevid   statopts = self.merge_opts(commands.table['^status|st'][1],