# HG changeset patch # User "Yann E. MORIN" # Date 1316383069 -7200 # Node ID 0834e0bb445a0f384d362e909857cb77dd5c6a9c # Parent 883d28233a4d004e66d48a5d8f2dd03e846fdd6e bisect: add some bisection examples, and some log revset.bisect() examples Add a few examples on how to use bisect: - a few bisection examples Signed-off-by: "Yann E. MORIN" diff -r 883d28233a4d -r 0834e0bb445a mercurial/commands.py --- a/mercurial/commands.py Sat Sep 17 14:33:20 2011 +0200 +++ b/mercurial/commands.py Sun Sep 18 23:57:49 2011 +0200 @@ -501,6 +501,52 @@ (command not found) will abort the bisection, and any other non-zero exit status means the revision is bad. + .. container:: verbose + + Some examples: + + - start a bisection with known bad revision 12, and good revision 34:: + + hg bisect --bad 34 + hg bisect --good 12 + + - advance the current bisection by marking current revision as good or + bad:: + + hg bisect --good + hg bisect --bad + + - mark the current revision, or a known revision, to be skipped (eg. if + that revision is not usable because of another issue):: + + hg bisect --skip + hg bisect --skip 23 + + - forget the current bisection:: + + hg bisect --reset + + - use 'make && make tests' to automatically find the first broken + revision:: + + hg bisect --reset + hg bisect --bad 34 + hg bisect --good 12 + hg bisect --command 'make && make tests' + + - see all changesets whose states are already known in the current + bisection:: + + hg log -r "bisect(pruned)" + + - see all changesets that took part in the current bisection:: + + hg log -r "bisect(range)" + + - with the graphlog extension, you can even get a nice graph:: + + hg log --graph -r "bisect(range)" + Returns 0 on success. """ def extendbisectrange(nodes, good):