changeset 46242:cb12658bf0e1

scmutil: improve documentation of writereporequirements() This makes it easier to understand the difference between `writerequires()` and `writereporequirements()`. Differential Revision: https://phab.mercurial-scm.org/D9568
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 08 Dec 2020 16:41:13 +0530
parents 012e25abc603
children 63c923fd7fa8
files mercurial/scmutil.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Fri Nov 20 08:02:25 2020 +0100
+++ b/mercurial/scmutil.py	Tue Dec 08 16:41:13 2020 +0530
@@ -1573,7 +1573,12 @@
 
 
 def writereporequirements(repo, requirements=None):
-    """ writes requirements for the repo to .hg/requires """
+    """writes requirements for the repo
+
+    Requirements are written to .hg/requires and .hg/store/requires based
+    on whether share-safe mode is enabled and which requirements are wdir
+    requirements and which are store requirements
+    """
     if requirements:
         repo.requirements = requirements
     wcreq, storereq = filterrequirements(repo.requirements)