changeset 166:08a4467f4891

Try to get the bisect extension to behave.
author Bryan O'Sullivan <bos@serpentine.com>
date Mon, 26 Mar 2007 22:59:43 -0700
parents 06d18465df03
children e67251ac336f f8b5b782e150
files en/examples/bisect en/examples/bisect.commits.out en/examples/bisect.help.out en/examples/bisect.init.out en/examples/bisect.search.bad-init.out en/examples/bisect.search.good-init.out en/examples/bisect.search.init.out en/examples/bisect.search.mytest.out en/examples/bisect.search.reset.out en/examples/bisect.search.rest.out en/examples/bisect.search.step1.out en/examples/bisect.search.step2.out en/examples/run-example
diffstat 13 files changed, 34 insertions(+), 75 deletions(-) [+]
line wrap: on
line diff
--- a/en/examples/bisect	Mon Mar 26 22:45:48 2007 -0700
+++ b/en/examples/bisect	Mon Mar 26 22:59:43 2007 -0700
@@ -6,8 +6,6 @@
 # XXX There's some kind of horrible nondeterminism in the execution of
 # bisect at the moment.  Ugh.
 
-#$ ignore: .*
-
 #$ name: init
 
 hg init mybug
@@ -40,6 +38,8 @@
 
 hg bisect bad
 
+#$ drop_output: yes
+
 #$ name: search.good-init
 
 hg bisect good 10
--- a/en/examples/bisect.commits.out	Mon Mar 26 22:45:48 2007 -0700
+++ b/en/examples/bisect.commits.out	Mon Mar 26 22:59:43 2007 -0700
@@ -1,10 +1,10 @@
-
-
-
-
-
-
-
-
-
-
+$ \textbf{buggy_change=37}
+$ \textbf{for (( i = 0; i < 50; i++ )); do}
+> \textbf{  if [[ $i = $buggy_change ]]; then}
+> \textbf{    echo 'i have a gub' > myfile$i}
+> \textbf{    hg commit -q -A -m 'buggy changeset'}
+> \textbf{  else}
+> \textbf{    echo 'nothing to see here, move along' > myfile$i}
+> \textbf{    hg commit -q -A -m 'normal changeset'}
+> \textbf{  fi}
+> \textbf{done}
--- a/en/examples/bisect.help.out	Mon Mar 26 22:45:48 2007 -0700
+++ b/en/examples/bisect.help.out	Mon Mar 26 22:59:43 2007 -0700
@@ -1,14 +1,14 @@
-
-
-
-
-
-
+$ \textbf{hg help bisect}
+hg bisect [help|init|reset|next|good|bad]
 
-
-
-
+bisect extension: dichotomic search in the DAG of changesets
+for subcommands see "hg bisect help"
+$ \textbf{hg bisect help}
+list of subcommands for the bisect extension
 
-
-
-
+ bad     mark revision as bad and update to the next revision to test
+ good    mark revision as good and update to the next revision to test
+ help    show help for a given bisect subcommand or all subcommands
+ init    start a new bisection
+ next    find and update to the next revision to test
+ reset   finish a bisection
--- a/en/examples/bisect.init.out	Mon Mar 26 22:45:48 2007 -0700
+++ b/en/examples/bisect.init.out	Mon Mar 26 22:59:43 2007 -0700
@@ -1,2 +1,2 @@
-
-
+$ \textbf{hg init mybug}
+$ \textbf{cd mybug}
--- a/en/examples/bisect.search.bad-init.out	Mon Mar 26 22:45:48 2007 -0700
+++ b/en/examples/bisect.search.bad-init.out	Mon Mar 26 22:59:43 2007 -0700
@@ -1,1 +1,1 @@
-
+$ \textbf{hg bisect bad}
--- a/en/examples/bisect.search.good-init.out	Mon Mar 26 22:45:48 2007 -0700
+++ b/en/examples/bisect.search.good-init.out	Mon Mar 26 22:59:43 2007 -0700
@@ -1,3 +0,0 @@
-
-
-
--- a/en/examples/bisect.search.init.out	Mon Mar 26 22:45:48 2007 -0700
+++ b/en/examples/bisect.search.init.out	Mon Mar 26 22:59:43 2007 -0700
@@ -1,1 +1,1 @@
-
+$ \textbf{hg bisect init}
--- a/en/examples/bisect.search.mytest.out	Mon Mar 26 22:45:48 2007 -0700
+++ b/en/examples/bisect.search.mytest.out	Mon Mar 26 22:59:43 2007 -0700
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
--- a/en/examples/bisect.search.reset.out	Mon Mar 26 22:45:48 2007 -0700
+++ b/en/examples/bisect.search.reset.out	Mon Mar 26 22:59:43 2007 -0700
@@ -1,1 +0,0 @@
-
--- a/en/examples/bisect.search.rest.out	Mon Mar 26 22:45:48 2007 -0700
+++ b/en/examples/bisect.search.rest.out	Mon Mar 26 22:59:43 2007 -0700
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--- a/en/examples/bisect.search.step1.out	Mon Mar 26 22:45:48 2007 -0700
+++ b/en/examples/bisect.search.step1.out	Mon Mar 26 22:59:43 2007 -0700
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
--- a/en/examples/bisect.search.step2.out	Mon Mar 26 22:45:48 2007 -0700
+++ b/en/examples/bisect.search.step2.out	Mon Mar 26 22:59:43 2007 -0700
@@ -1,4 +0,0 @@
-
-
-
-
--- a/en/examples/run-example	Mon Mar 26 22:45:48 2007 -0700
+++ b/en/examples/run-example	Mon Mar 26 22:59:43 2007 -0700
@@ -50,7 +50,7 @@
     shell = '/usr/bin/env bash'
     ps1 = '__run_example_ps1__ '
     ps2 = '__run_example_ps2__ '
-    pi_re = re.compile(r'#\$\s*(name|ignore):\s*(.*)$')
+    pi_re = re.compile(r'#\$\s*(drop_output|name|ignore):\s*(.*)$')
     
     timeout = 5
 
@@ -189,6 +189,8 @@
 
         err = False
 
+        drop_output = False
+
         try:
             try:
                 # eat first prompt string from shell
@@ -219,10 +221,12 @@
                                 ofp = None
                         elif pi == 'ignore':
                             ignore.append(rest)
+                        elif pi == 'drop_output':
+                            drop_output = dict(yes=1,no=0)[rest.lower()]
                     elif hunk.strip():
                         # it's something we should execute
                         newps, output = self.sendreceive(hunk)
-                        if not ofp:
+                        if not ofp or drop_output:
                             continue
                         # first, print the command we ran
                         if not hunk.startswith('#'):