Patchwork D1233: rebase: do not bail on uncomitted changes if rebasing in-memory

login
register
mail settings
Submitter phabricator
Date Dec. 7, 2017, 10:15 p.m.
Message ID <62b28522b09cbfa4253a8d91bfef8c6a@localhost.localdomain>
Download mbox | patch
Permalink /patch/26056/
State Not Applicable
Headers show

Comments

phabricator - Dec. 7, 2017, 10:15 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGaa660c1203a9: rebase: do not bail on uncomitted changes if rebasing in-memory (authored by phillco, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1233?vs=4198&id=4221

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

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




To: phillco, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -784,7 +784,8 @@ 
                 return retcode
         else:
             destmap = _definedestmap(ui, repo, destf, srcf, basef, revf,
-                                     destspace=destspace)
+                                     destspace=destspace,
+                                     inmemory=opts['inmemory'])
             retcode = rbsrt._preparenewrebase(destmap)
             if retcode is not None:
                 return retcode
@@ -804,7 +805,7 @@ 
         rbsrt._finishrebase()
 
 def _definedestmap(ui, repo, destf=None, srcf=None, basef=None, revf=None,
-                   destspace=None):
+                   destspace=None, inmemory=False):
     """use revisions argument to define destmap {srcrev: destrev}"""
     if revf is None:
         revf = []
@@ -818,8 +819,9 @@ 
     if revf and srcf:
         raise error.Abort(_('cannot specify both a revision and a source'))
 
-    cmdutil.checkunfinished(repo)
-    cmdutil.bailifchanged(repo)
+    if not inmemory:
+        cmdutil.checkunfinished(repo)
+        cmdutil.bailifchanged(repo)
 
     if ui.configbool('commands', 'rebase.requiredest') and not destf:
         raise error.Abort(_('you must specify a destination'),