Patchwork D8705: commitctx: document the manifest writing function

login
register
mail settings
Submitter phabricator
Date July 8, 2020, 8:38 a.m.
Message ID <differential-rev-PHID-DREV-olv7s7xje4dslamunqex-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46660/
State Superseded
Headers show

Comments

phabricator - July 8, 2020, 8:38 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/manifest.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -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()