Addresses #696
# HG changeset patch
# User Emmanuel Rosa <goaway1...@gmail.com>
# Date 1258397299 18000
# Node ID c1cc263fdc538cb4a37fb4f85fb0da843afe0dc0
# Parent 07b08e3d9b5b5f6e97072d0ca3c2b9b65dc1fb18
history: add bisect support
Addresses #696
diff --git a/tortoisehg/hgtk/history.py b/tortoisehg/hgtk/history.py
--- a/tortoisehg/hgtk/history.py
+++ b/tortoisehg/hgtk/history.py
@@ -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],
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop