diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
index 232d4b9d391a6d73f8ae81af238766540c386f31_bWVyY3VyaWFsL3NjbXV0aWwucHk=..ad4a3e2eedb300ada9d3267ca52e61b13eecf773_bWVyY3VyaWFsL3NjbXV0aWwucHk= 100644
--- 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)