Patchwork D6684: unshelve: modify --continue on interactive unshelve

login
register
mail settings
Submitter phabricator
Date July 24, 2019, 6:02 p.m.
Message ID <2a9cf191df2d0ea879c6bcd7101061e6@localhost.localdomain>
Download mbox | patch
Permalink /patch/41062/
State Not Applicable
Headers show

Comments

phabricator - July 24, 2019, 6:02 p.m.
navaneeth.suresh edited the summary of this revision.
navaneeth.suresh updated this revision to Diff 16058.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6684?vs=16056&id=16058

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6684/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6684

AFFECTED FILES
  mercurial/shelve.py

CHANGE DETAILS




To: navaneeth.suresh, #hg-reviewers
Cc: pulkit, mercurial-devel

Patch

diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -698,11 +698,12 @@ 
             if shfile.exists():
                 shfile.movetobackup()
         cleanupoldbackups(repo)
-def unshelvecontinue(ui, repo, state, opts, basename=None):
+def unshelvecontinue(ui, repo, state, opts):
     """subcommand to continue an in-progress unshelve"""
     # We're finishing off a merge. First parent is our original
     # parent, second is the temporary "fake" commit we're unshelving.
     interactive = state.interactive
+    basename = state.name
     with repo.lock():
         checkparents(repo, state)
         ms = merge.mergestate.read(repo)
@@ -933,7 +934,7 @@ 
     if opts.get("name"):
         shelved.append(opts["name"])
 
-    if abortf or continuef and not interactive:
+    if abortf or continuef:
         if abortf and continuef:
             raise error.Abort(_('cannot use both abort and continue'))
         if shelved:
@@ -955,11 +956,8 @@ 
             raise error.Abort(_('no shelved changes to apply!'))
         basename = util.split(shelved[0][1])[1]
         ui.status(_("unshelving change '%s'\n") % basename)
-    elif shelved:
+    else:
         basename = shelved[0]
-    if continuef and interactive:
-        state = _loadshelvedstate(ui, repo, opts)
-        return unshelvecontinue(ui, repo, state, opts, basename)
 
     if not shelvedfile(repo, basename, patchextension).exists():
         raise error.Abort(_("shelved change '%s' not found") % basename)