mercurial/commands.py
changeset 6930 a58a611c320f
parent 6861 0b6f2fa5e03f
parent 6929 1b15d6e7cc3c
child 6932 d557749c627a
equal deleted inserted replaced
6927:959113c5e1cd 6930:a58a611c320f
   266 
   266 
   267     This command helps to find changesets which introduce problems.
   267     This command helps to find changesets which introduce problems.
   268     To use, mark the earliest changeset you know exhibits the problem
   268     To use, mark the earliest changeset you know exhibits the problem
   269     as bad, then mark the latest changeset which is free from the
   269     as bad, then mark the latest changeset which is free from the
   270     problem as good. Bisect will update your working directory to a
   270     problem as good. Bisect will update your working directory to a
   271     revision for testing. Once you have performed tests, mark the
   271     revision for testing (unless the --noupdate option is specified).
   272     working directory as bad or good and bisect will either update to
   272     Once you have performed tests, mark the working directory as bad
   273     another candidate changeset or announce that it has found the bad
   273     or good and bisect will either update to another candidate changeset
   274     revision.
   274     or announce that it has found the bad revision.
       
   275     
       
   276     As a shortcut, you can also use the revision argument to mark a
       
   277     revision as good or bad without checking it out first.
   275     """
   278     """
   276     # backward compatibility
   279     # backward compatibility
   277     if rev in "good bad reset init".split():
   280     if rev in "good bad reset init".split():
   278         ui.warn(_("(use of 'hg bisect <cmd>' is deprecated)\n"))
   281         ui.warn(_("(use of 'hg bisect <cmd>' is deprecated)\n"))
   279         cmd, rev, extra = rev, extra, None
   282         cmd, rev, extra = rev, extra, None
   282         elif cmd == "bad":
   285         elif cmd == "bad":
   283             bad = True
   286             bad = True
   284         else:
   287         else:
   285             reset = True
   288             reset = True
   286     elif extra or good + bad + skip + reset > 1:
   289     elif extra or good + bad + skip + reset > 1:
   287         raise util.Abort("Incompatible arguments")
   290         raise util.Abort(_('incompatible arguments'))
       
   291     elif not (good or bad or skip or reset):
       
   292         ui.status(_('(no action selected)\n'))
       
   293         return
   288 
   294 
   289     if reset:
   295     if reset:
   290         p = repo.join("bisect.state")
   296         p = repo.join("bisect.state")
   291         if os.path.exists(p):
   297         if os.path.exists(p):
   292             os.unlink(p)
   298             os.unlink(p)