# HG changeset patch # User Matt Mackall # Date 1199146833 21600 # Node ID 23caedc5a28fbc52806bd573a5d61d77a29c0766 # Parent c7e9f83c6cbc3432dc3e414a60cbf002fc5ad762 bisect: add noupdate option diff -r c7e9f83c6cbc -r 23caedc5a28f hgext/hbisect.py --- a/hgext/hbisect.py Mon Dec 31 18:20:25 2007 -0600 +++ b/hgext/hbisect.py Mon Dec 31 18:20:33 2007 -0600 @@ -77,7 +77,7 @@ return (best_node, tot) def bisect(ui, repo, rev=None, extra=None, - reset=None, good=None, bad=None, skip=None): + reset=None, good=None, bad=None, skip=None, noupdate=None): """Subdivision search of changesets This extension helps to find changesets which introduce problems. @@ -160,14 +160,16 @@ ui.write(_("Testing changeset %s:%s " "(%s changesets remaining, ~%s tests)\n") % (rev, hg.short(node), changesets, tests)) - cmdutil.bail_if_changed(repo) - return hg.clean(repo, node) + if not noupdate: + cmdutil.bail_if_changed(repo) + return hg.clean(repo, node) cmdtable = { "bisect": (bisect, [('r', 'reset', False, _('reset bisect state')), ('g', 'good', False, _('mark changeset good')), ('b', 'bad', False, _('mark changeset bad')), - ('s', 'skip', False, _('skip testing changeset'))], + ('s', 'skip', False, _('skip testing changeset')), + ('U', 'noupdate', False, _('do not update to target'))], _("hg bisect [-gbsr] [REV]")) }