Patchwork D6120: scmutil: document matcher argument of movedirstate()

login
register
mail settings
Submitter phabricator
Date March 11, 2019, 11:17 p.m.
Message ID <26922346023c2d3e961296665d5ce427@localhost.localdomain>
Download mbox | patch
Permalink /patch/39227/
State Not Applicable
Headers show

Comments

phabricator - March 11, 2019, 11:17 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGad4a3e2eedb3: scmutil: document matcher argument of movedirstate() (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6120?vs=14469&id=14473

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

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1255,7 +1255,12 @@ 
             wctx.copy(origsrc, dst)
 
 def movedirstate(repo, newctx, match=None):
-    """Move the dirstate to newctx and adjust it as necessary."""
+    """Move the dirstate to newctx and adjust it as necessary.
+
+    A matcher can be provided as an optimization. It is probably a bug to pass
+    a matcher that doesn't match all the differences between the parent of the
+    working copy and newctx.
+    """
     oldctx = repo['.']
     ds = repo.dirstate
     ds.setparents(newctx.node(), nullid)