comparison mercurial/localrepo.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 3e40abe0a170
children c93dd9d9f1e6
comparison
equal deleted inserted replaced
45105:5d09a120b4be 45106:a03c177a4679
1295 capsblob = bundle2.encodecaps( 1295 capsblob = bundle2.encodecaps(
1296 bundle2.getrepocaps(self, role=b'client') 1296 bundle2.getrepocaps(self, role=b'client')
1297 ) 1297 )
1298 caps.add(b'bundle2=' + urlreq.quote(capsblob)) 1298 caps.add(b'bundle2=' + urlreq.quote(capsblob))
1299 return caps 1299 return caps
1300
1301 def _writerequirements(self):
1302 scmutil.writerequires(self.vfs, self.requirements)
1303 1300
1304 # Don't cache auditor/nofsauditor, or you'll end up with reference cycle: 1301 # Don't cache auditor/nofsauditor, or you'll end up with reference cycle:
1305 # self -> auditor -> self._checknested -> self 1302 # self -> auditor -> self._checknested -> self
1306 1303
1307 @property 1304 @property