Mercurial > hg
diff mercurial/upgrade.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 | 4c1d39215034 |
children | e58e234096de |
line wrap: on
line diff
--- a/mercurial/upgrade.py Tue Jul 14 11:28:06 2020 -0700 +++ b/mercurial/upgrade.py Tue Apr 14 16:43:54 2020 +0530 @@ -1091,8 +1091,8 @@ b'unable to read from repository\n' ) ) - scmutil.writerequires( - srcrepo.vfs, srcrepo.requirements | {b'upgradeinprogress'} + scmutil.writereporequirements( + srcrepo, srcrepo.requirements | {b'upgradeinprogress'} ) ui.status(_(b'starting in-place swap of repository data\n')) @@ -1122,7 +1122,7 @@ b'again\n' ) ) - scmutil.writerequires(srcrepo.vfs, requirements) + scmutil.writereporequirements(srcrepo, requirements) # The lock file from the old store won't be removed because nothing has a # reference to its new location. So clean it up manually. Alternatively, we