[morestatus] add helpful message to status when in bisect

Summary:
A continuation D2502125. Add more helpful output to hg status when the user is
in a bisect state.

Example output


  10/07 17:43 cdelahousse@dev4253 ~/local/clearmereg/testrepos/states/bisect
  $ hg status

  # The repository is in an unfinished *bisect* state.
  # To mark the commit good:       hg bisect --good
  # To mark the commit bad:        hg bisect --bad
  # To abort:                      hg bisect --reset

Test Plan: Tests have been updated

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: akushner

Differential Revision: https://phabricator.fb.com/D2520493

Tasks: 8563305

Signature: t1:2520493:1444288081:5da20016aaaaff77db24ecb01c404b0e11aeeb7a
This commit is contained in:
Christian Delahousse 2015-10-07 17:40:42 -07:00
parent b5ee3f4aed
commit 70b85f9c12
2 changed files with 10 additions and 1 deletions

View File

@ -66,10 +66,16 @@ def mergemsg(ui):
helpmessage(ui, 'hg commit', 'hg update --clean . (warning: this will '
'erase all uncommitted changed)')
def bisectmsg(ui):
msg = _('To mark the commit good: hg bisect --good\n'
'To mark the commit bad: hg bisect --bad\n'
'To abort: hg bisect --reset\n')
ui.warn(prefixlines(msg))
STATES = (
# (state, file path indicating states, helpful message function)
('histedit', 'histedit-state', histeditmsg),
('bisect', 'bisect.state', None),
('bisect', 'bisect.state', bisectmsg),
('graft', 'graftstate', graftmsg),
('unshelve', 'unshelverebasestate', unshelvemsg),
('rebase', 'rebasestate', rebasemsg),

View File

@ -40,6 +40,9 @@ Test bisect state
$ hg status
# The repository is in an unfinished *bisect* state.
# To mark the commit good: hg bisect --good
# To mark the commit bad: hg bisect --bad
# To abort: hg bisect --reset
Test hg status is normal after bisect reset
$ hg bisect --reset