Mercurial > public > mercurial-scm > hg
comparison mercurial/bundle2.py @ 32892:a7851519ea02
check-concurrency: expose the feature as 'concurrent-push-mode'
We move the feature to a proper configuration and document it. The config goes
in the 'server' section because it feels like something the server owner would
want to decide. We pick and open field because it seems likely that other
checking levels will emerge in the future. (eg: server like the mozilla-try
server will likely wants a "none" value)
The option name contains 'push' since this affects 'push' only. The option value
'check-related' is preferred over one explicitly containing 'allow' or 'deny'
because the client still have a strong decision power here. Here, the server is
just advising the client on the check mode to use.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 28 May 2017 00:12:38 +0200 |
parents | 16ada4cbb1a9 |
children | af31d531dda0 |
comparison
equal
deleted
inserted
replaced
32891:7e2eb964a561 | 32892:a7851519ea02 |
---|---|
1321 if obsolete.isenabled(repo, obsolete.exchangeopt): | 1321 if obsolete.isenabled(repo, obsolete.exchangeopt): |
1322 supportedformat = tuple('V%i' % v for v in obsolete.formats) | 1322 supportedformat = tuple('V%i' % v for v in obsolete.formats) |
1323 caps['obsmarkers'] = supportedformat | 1323 caps['obsmarkers'] = supportedformat |
1324 if allowpushback: | 1324 if allowpushback: |
1325 caps['pushback'] = () | 1325 caps['pushback'] = () |
1326 if not repo.ui.configbool('experimental', 'checkheads-strict', True): | 1326 cpmode = repo.ui.config('server', 'concurrent-push-mode', 'strict') |
1327 if cpmode == 'check-related': | |
1327 caps['checkheads'] = ('related',) | 1328 caps['checkheads'] = ('related',) |
1328 return caps | 1329 return caps |
1329 | 1330 |
1330 def bundle2caps(remote): | 1331 def bundle2caps(remote): |
1331 """return the bundle capabilities of a peer as dict""" | 1332 """return the bundle capabilities of a peer as dict""" |