[Commented On] D10849: localrepo: introduce a clone_requirements function
baymax (Baymax, Your Personal Patch-care Companion)
phabricator at mercurial-scm.org
Tue Jun 15 14:25:34 UTC 2021
baymax added a comment.
baymax updated this revision to Diff 28571.
✅ refresh by Heptapod after a successful CI run (🐙 💚)
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10849?vs=28526&id=28571
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10849/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10849
AFFECTED FILES
mercurial/localrepo.py
CHANGE DETAILS
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -3485,6 +3485,24 @@
return createopts
+def clone_requirements(ui, createopts, srcrepo):
+ """clone the requirements of a local repo for a local clone
+
+ The store requirements are unchanged while the working copy requirements
+ depends on the configuration
+ """
+ target_requirements = set()
+ createopts = defaultcreateopts(ui, createopts=createopts)
+ for r in newreporequirements(ui, createopts):
+ if r in requirementsmod.WORKING_DIR_REQUIREMENTS:
+ target_requirements.add(r)
+
+ for r in srcrepo.requirements:
+ if r not in requirementsmod.WORKING_DIR_REQUIREMENTS:
+ target_requirements.add(r)
+ return target_requirements
+
+
def newreporequirements(ui, createopts):
"""Determine the set of requirements for a new local repository.
To: marmoute, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210615/375996da/attachment-0002.html>
More information about the Mercurial-patches
mailing list