title: Is there a recommended command for "hg bisect --command"?
body: <p>I have an emergent bug that I've got to track down tomorrow. I know a previous hg revision which was good so I'm thinking about using hg bisect.</p>
  
  <p>However, I'm on Windows and don't want to get into DOS scripting.</p>
  
  <p>Ideally, I'd be able to write a Python unit test and have hg bisect use that. This is my first attempt.</p>
  
  <p>bisector.py</p>
  
  <pre><code>#!/usr/bin/env python
  
  import sys
  import unittest
  
  class TestCase(unittest.TestCase):
  
      def test(self):
          #raise Exception('Exception for testing.')
          #self.fail("Failure for testing.")
          pass
  
  
  def main():
      suite = unittest.defaultTestLoader.loadTestsFromTestCase(TestCase)
      result = unittest.TestResult()
      suite.run(result)
  
      if result.errors:
          # Skip the revision
          return 125
  
      if result.wasSuccessful():
          return 0
      else:
          return 1
  
  
  if '__main__' == __name__:
      sys.exit(main())
  </code></pre>
  
  <p>Perhaps I could then run:</p>
  
  <pre><code>hg bisect --reset
  hg bisect --bad
  hg bisect --good -r 1
  hg bisect --command=bisector.py
  </code></pre>
  
  <p>Is there a better way of doing it? Thanks for any advice.</p>