Commit Graph

6 Commits

Author SHA1 Message Date
Christian Delahousse
165bf7ee63 morestatus: make morestatus not rely on mergestate for merge state
Summary:
The extra check for clean merge vs conflicted merge isn't needed. They both have
two parents

Test Plan: Ran the tests.

Reviewers: rmcelroy, #sourcecontrol, durham

Reviewed By: durham

Subscribers: michalburger1

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

Tasks: 8867673

Signature: t1:2587459:1445982486:0b7515558e2d57d4f0a949641b846036f82ec1e0
2015-10-27 14:48:34 -07:00
Christian Delahousse
93ef580a25 morestatus: include clean merge state, refactor state detection
Summary:
I was mostly taking into consideration conflicted states when I wrote this
extension. That means that a repo could be in a clean merge state, that is,
where the working copy has two parents and no conflicted files, and morestatus
wouldn't display it's extra status output.

Test Plan: See new test

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: akushner

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

Tasks: 8802101

Signature: t1:2567597:1445468752:429a63dda5a7269841aee16631049b937c13360e
2015-10-21 15:20:24 -07:00
Christian Delahousse
70b85f9c12 [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
2015-10-07 17:40:42 -07:00
Christian Delahousse
b5ee3f4aed [morestatus] messages in status for histedit, graft, unshelve, merge states
Summary:
Continuation of D2502125. Let's help people when they're in a wierd states by
displaying a helpful message below the output of `hg status`

Example output:
  10/07 16:53 cdelahousse@dev4253 ~/local/clearmereg/testrepos/states/merge
  $ hg status
  M a

  # The repository is in an unfinished *merge* state.
  # Unresolved merge conflicts:
  #
  #     a
  #
  # To mark files as resolved:  hg resolve --mark FILE
  # To continue:                hg commit
  # To abort:                   hg update --clean .

For more example output, see the tests

Test Plan: See tests: `tests/test-morestatus.t`

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: akushner

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

Tasks: 8563305

Signature: t1:2520272:1444287977:b90b747538754ef4f4f0f8fab3e56f3aa288d3e5
2015-10-07 17:03:17 -07:00
Christian Delahousse
4b30d6677c [morestatus] more helpful status for rebase
Summary:
If a user gets stuck in a stopped rebase, give some details to the user when
they run `hg status` about how to move forward.

Let's see if we can get some bike shedding done on one command.

Notes on behaviour:
* it there exists any unresolved conflicts, no matter, they'll be shown.
* there is no way to only show what state the user is in (and not the conflicts). You either turn more status on or off.

Example for rebase:

  10/05 19:34 cdelahousse@dev4253 ~/local/clearmereg/testrepos/states/rebasestate
  $ hg status
  M a

  # The repository is in an unfinished *rebase* state.
  # Unresolved merge conflicts:
  #
  #     a
  #
  # To mark files as resolved:  hg resolve --mark FILE
  # To continue:                hg rebase --continue
  # To abort:                   hg rebase --abort


Repo in rebase state after the all files have been resolved:

  $ hg status
  M a

  # The repository is in an unfinished *rebase* state.
  # No unresolved merge conflicts
  # To continue:                hg rebase --continue
  # To abort:                   hg rebase --abort

Test Plan: See tests

Reviewers: #sourcecontrol, rmcelroy, durham

Reviewed By: durham

Subscribers: dancol, pyd, akushner

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

Tasks: 8563305

Signature: t1:2502125:1444189728:d6abf28f09bcc0360628497db8d896025967827f
2015-10-01 21:24:43 -07:00
Christian Delahousse
cc9035e370 [status] Make status show what state the repo is in
Summary:
This is an MVP to give the user more information about the state of the repo. We'll grow the functionality in other diffs.

 for example, if the repo is in a state after a stalled graft, then hg status outputs a bit more

  $ hg status
   M a
   ? a.orig
   # The repository is in an unfinished graft state.

Test Plan: See the tests.

Reviewers: #sourcecontrol, durham, rmcelroy

Subscribers: akushner, rmcelroy

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

Tasks: 8563305
2015-10-01 20:17:28 -07:00