scmutil: improve documentation of writereporequirements()
authorPulkit Goyal <7895pulkit@gmail.com>
Tue, 08 Dec 2020 16:41:13 +0530
changeset 46242 cb12658bf0e1
parent 46241 012e25abc603
child 46243 63c923fd7fa8
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
mercurial/scmutil.py
--- 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)