D6115: unamend: added match as argument for scmutil.movedirstate

taapas1128 (Taapas Agrawal) phabricator at mercurial-scm.org
Tue Mar 12 12:53:48 EDT 2019


taapas1128 updated this revision to Diff 14476.
taapas1128 retitled this revision from "unamend: added match as argument for _firdirstate() in unamend()" to "unamend: added match as argument for scmutil.movedirstate".

REPOSITORY
  rHG Mercurial

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

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

AFFECTED FILES
  hgext/uncommit.py

CHANGE DETAILS

diff --git a/hgext/uncommit.py b/hgext/uncommit.py
--- a/hgext/uncommit.py
+++ b/hgext/uncommit.py
@@ -175,12 +175,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
@@ -217,7 +218,7 @@
         dirstate = repo.dirstate
 
         with dirstate.parentchange():
-            scmutil.movedirstate(repo, newpredctx)
+            scmutil.movedirstate(repo, newpredctx, match)
 
         mapping = {curctx.node(): (newprednode,)}
         scmutil.cleanupnodes(repo, mapping, 'unamend', fixphase=True)



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


More information about the Mercurial-devel mailing list