commitctx: document the manifest writing function
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 06 Jul 2020 21:08:15 +0200
changeset 45066 5a80915e99ce
parent 45065 b8f4ead9fa49
child 45067 9a062913bab6
commitctx: document the manifest writing function Same spirit as for `_filecommit` lets document the input and output before making any change or improvement. This is part of a larger refactoring/cleanup of the commitctx code to clarify and augment the logic gathering metadata useful for copy tracing. The current code is a tad too long and entangled to make such update easy. We start with easy and small cleanup. Differential Revision: https://phab.mercurial-scm.org/D8705
mercurial/manifest.py
--- a/mercurial/manifest.py	Mon Jul 06 19:16:04 2020 +0200
+++ b/mercurial/manifest.py	Mon Jul 06 21:08:15 2020 +0200
@@ -1665,6 +1665,22 @@
         readtree=None,
         match=None,
     ):
+        """add some manifest entry in to the manifest log
+
+        input:
+
+          m:           the manifest dict we want to store
+          transaction: the open transaction
+          p1:          manifest-node of p1
+          p2:          manifest-node of p2
+          added:       file added/changed compared to parent
+          removed:     file removed compared to parent
+
+        tree manifest input:
+
+          readtree:    a function to read a subtree
+          match:       a filematcher for the subpart of the tree manifest
+        """
         try:
             if p1 not in self.fulltextcache:
                 raise FastdeltaUnavailable()