changeset 41943:ad4a3e2eedb3

scmutil: document matcher argument of movedirstate() Differential Revision: https://phab.mercurial-scm.org/D6120
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 11 Mar 2019 14:04:48 -0700
parents 232d4b9d391a
children 7e95ade0f369
files mercurial/scmutil.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Mon Mar 11 09:42:29 2019 -0700
+++ b/mercurial/scmutil.py	Mon Mar 11 14:04:48 2019 -0700
@@ -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)