When doing an hg bisect in eclipse, I like that I can see all of the bads and goods I've marked in the past.
Is there a way to get that information at the command line?
How can you get the current state (history of good/bad revisions) of a bisect from mercurial
1k views Asked by Joshua Goldberg At
4
There are 4 answers
0
On
Here's a bash script (I called it bisectstate) that works now that the bisected() predicate is available.
(I used colorex to pretty it up with colors, but you can take that out if you don't have it installed.)
#!/bin/bash -f
style() {
echo "{rev}$1 {author|person} {date|shortdate} {desc|firstline}\n"
}
(hg log -r 'not . and bisect(good)' --template "`style -good:`" ;
hg log -r '. and bisect(range) and not (bisect(good) or bisect(bad) or bisect(skip))' --template "`style -cur:`" ;
hg log -r "not . and bisect(bad)" --template "`style -bad:`" ;
hg log -r 'not . and bisect(skip)' --template "`style -skip:`" ;
hg log -r '. and bisect(good)' --template "`style -cur=good:`" ;
hg log -r '. and bisect(bad)' --template "`style -cur=bad:`" ;
hg log -r '. and bisect(skip)' --template "`style -cur=skip:`" ;
# Include the intermediate, unmarked changes in the bisect range.
hg log -r "bisect(range) and not (. or bisect(good) or bisect(bad) or bisect(skip))" --template "`style`"
) \
| sort | colorex -r bad: -b good: -g 'cur[=:]'
The output looks like this:

There's a revset predicate for that:
source
For future reference, Mercurial 2.0 will introduce an improved version (the old one will continue to work):