Patchwork D6115: unamend: added match as argument for _firdirstate() in unamend()

login
register
mail settings
Submitter phabricator
Date March 11, 2019, 5:22 p.m.
Message ID <49b2b2f625dec6c52a476911f6d9e670@localhost.localdomain>
Download mbox | patch
Permalink /patch/39219/
State Not Applicable
Headers show

Comments

phabricator - March 11, 2019, 5:22 p.m.
taapas1128 updated this revision to Diff 14465.
taapas1128 retitled this revision from "unamend: made match optional in firdirstate()" to "unamend: added match as argument for _firdirstate() in unamend()".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6115?vs=14462&id=14465

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

AFFECTED FILES
  hgext/uncommit.py

CHANGE DETAILS




To: taapas1128, #hg-reviewers
Cc: martinvonz, mercurial-devel

Patch

diff --git a/hgext/uncommit.py b/hgext/uncommit.py
--- a/hgext/uncommit.py
+++ b/hgext/uncommit.py
@@ -214,12 +214,13 @@ 
     marked as modified `hg status`)
     """
 
+    opts = pycompat.byteskwargs(opts)
     unfi = repo.unfiltered()
     with repo.wlock(), repo.lock(), repo.transaction('unamend'):
 
         # identify the commit from which to unamend
         curctx = repo['.']
-
+        match = scmutil.match(curctx, opts)
         rewriteutil.precheck(repo, [curctx.rev()], 'unamend')
 
         # identify the commit to which to unamend
@@ -256,7 +257,7 @@ 
         dirstate = repo.dirstate
 
         with dirstate.parentchange():
-            _fixdirstate(repo, curctx, newpredctx)
+            _fixdirstate(repo, curctx, newpredctx, match)
 
         mapping = {curctx.node(): (newprednode,)}
         scmutil.cleanupnodes(repo, mapping, 'unamend', fixphase=True)