[Python-checkins] devguide: Introduce "hg bisect"

antoine.pitrou python-checkins at python.org
Wed Mar 9 01:06:48 CET 2011


http://hg.python.org/devguide/rev/763767f129cf
changeset:   380:763767f129cf
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Wed Mar 09 01:06:45 2011 +0100
summary:
  Introduce "hg bisect"

files:
  faq.rst

diff --git a/faq.rst b/faq.rst
--- a/faq.rst
+++ b/faq.rst
@@ -558,6 +558,28 @@
    hg update <tag>
 
 
+How do I find which changeset introduced a bug or regression?
+-------------------------------------------------------------
+
+``hg bisect``, as the name indicates, helps you do a bisection of a range of
+changesets.  Type::
+
+   hg bisect --bad
+
+when the current changeset has the bug.  Conversely, type::
+
+   hg bisect --good
+
+when the current changeset doesn't have the bug (note: you can conveniently start
+out with a faraway "good" changeset).  Mercurial will automatically
+bisect so as to narrow the range of possible culprits, until a single
+changeset is isolated.  Each time Mercurial presents you with a new changeset,
+re-compile Python and run the offending test, for example::
+
+   make -j2
+   ./python -m test -uall test_sometest
+
+
 How come feature XYZ isn't available in Mercurial?
 --------------------------------------------------
 

-- 
Repository URL: http://hg.python.org/devguide


More information about the Python-checkins mailing list