Mercurial > hg-stable
diff mercurial/sparse.py @ 45106:a03c177a4679
scmutil: add writereporequirements() and route requires writing through it
In upcoming patches, to implement Share Safe plan we will be introducing
requires file in store. We need to route all callers to a single function
to check for a share-safe requirement and if present, write requirements to
.hg/store/requires instead.
After this patch, callers directly calling scmutil.writerequires() are only
those where we don't have the repo object, for example when initializing
the repository object itself.
Differential Revision: https://phab.mercurial-scm.org/D8631
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 14 Apr 2020 16:43:54 +0530 |
parents | b7808443ed6a |
children | d70c972cec74 |
line wrap: on
line diff
--- a/mercurial/sparse.py Tue Jul 14 11:28:06 2020 -0700 +++ b/mercurial/sparse.py Tue Apr 14 16:43:54 2020 +0530 @@ -601,10 +601,10 @@ if b'exp-sparse' in oldrequires and removing: repo.requirements.discard(b'exp-sparse') - scmutil.writerequires(repo.vfs, repo.requirements) + scmutil.writereporequirements(repo) elif b'exp-sparse' not in oldrequires: repo.requirements.add(b'exp-sparse') - scmutil.writerequires(repo.vfs, repo.requirements) + scmutil.writereporequirements(repo) try: writeconfig(repo, includes, excludes, profiles) @@ -613,7 +613,7 @@ if repo.requirements != oldrequires: repo.requirements.clear() repo.requirements |= oldrequires - scmutil.writerequires(repo.vfs, repo.requirements) + scmutil.writereporequirements(repo) writeconfig(repo, oldincludes, oldexcludes, oldprofiles) raise