Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show commit being rebased during unfinished rebase #87

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions eden/scm/edenscm/hgext/morestatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import math
import os

from edenscm.hgext.rebase import rebaseruntime
from edenscm.mercurial import (
commands,
hbisect,
Expand Down Expand Up @@ -83,6 +84,18 @@ def helpmessage(ui, continuecmd, abortcmd):
def rebasemsg(repo, ui):
helpmessage(ui, "hg rebase --continue", "hg rebase --abort")

rbsrt = rebaseruntime(repo, ui, None, {})
rbsrt.restorestatus()
for (src, dest) in rbsrt.destmap.items():
if dest == rbsrt.originalwd:
ui.warn(
prefixlines(
f"\nCurrently rebasing {repo[src]}: {repo[src].shortdescription()}"
)
)
break



def histeditmsg(repo, ui):
helpmessage(ui, "hg histedit --continue", "hg histedit --abort")
Expand Down
6 changes: 6 additions & 0 deletions eden/scm/tests/test-fb-hgext-morestatus.t
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ Test rebase state
# To mark files as resolved: hg resolve --mark FILE
# To continue: hg rebase --continue
# To abort: hg rebase --abort
#
# Currently rebasing 2977a57ce863: remove content

Test status in rebase state with resolved files
$ hg resolve --mark a
Expand All @@ -156,6 +158,8 @@ Test status in rebase state with resolved files
# No unresolved merge conflicts.
# To continue: hg rebase --continue
# To abort: hg rebase --abort
#
# Currently rebasing 2977a57ce863: remove content

Test hg status is normal after rebase abort
$ hg rebase --abort -q
Expand All @@ -173,6 +177,8 @@ Test rebase with an interrupted update:
# The repository is in an unfinished *rebase* state.
# To continue: hg rebase --continue
# To abort: hg rebase --abort
#
# Currently rebasing 2977a57ce863: remove content
$ hg rebase --abort -q
rebase aborted

Expand Down