- skip-blame just some b prefixes
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
updating to branch default | updating to branch default | ||||
4 files updated, 0 files merged, 0 files removed, 0 files unresolved | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
try to clone via stream but missing requirements, so should use pull instead | try to clone via stream but missing requirements, so should use pull instead | ||||
$ cat > $TESTTMP/removesupportedformat.py << EOF | $ cat > $TESTTMP/removesupportedformat.py << EOF | ||||
> from mercurial import localrepo | > from mercurial import localrepo | ||||
> def extsetup(ui): | > def extsetup(ui): | ||||
> localrepo.localrepository.supportedformats.remove('generaldelta') | > localrepo.localrepository.supportedformats.remove(b'generaldelta') | ||||
> EOF | > EOF | ||||
$ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3 | $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3 | ||||
warning: stream clone requested but client is missing requirements: generaldelta | warning: stream clone requested but client is missing requirements: generaldelta | ||||
(see https://www.mercurial-scm.org/wiki/MissingRequirement for more information) | (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information) | ||||
requesting all changes | requesting all changes | ||||
adding changesets | adding changesets | ||||
adding manifests | adding manifests | ||||
$ cat << EOT > userpass.py | $ cat << EOT > userpass.py | ||||
> import base64 | > import base64 | ||||
> from mercurial.hgweb import common | > from mercurial.hgweb import common | ||||
> def perform_authentication(hgweb, req, op): | > def perform_authentication(hgweb, req, op): | ||||
> auth = req.env.get('HTTP_AUTHORIZATION') | > auth = req.env.get('HTTP_AUTHORIZATION') | ||||
> if not auth: | > if not auth: | ||||
> raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', | ||||
> [('WWW-Authenticate', 'Basic Realm="mercurial"')]) | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) | ||||
> if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']: | > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', | ||||
> b'pass']: | |||||
> raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') | ||||
> def extsetup(): | > def extsetup(): | ||||
> common.permhooks.insert(0, perform_authentication) | > common.permhooks.insert(0, perform_authentication) | ||||
> EOT | > EOT | ||||
$ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \ | $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \ | ||||
> --config server.preferuncompressed=True \ | > --config server.preferuncompressed=True \ | ||||
> --config web.push_ssl=False --config web.allow_push=* -A ../access.log | > --config web.push_ssl=False --config web.allow_push=* -A ../access.log | ||||
$ cat pid >> $DAEMON_PIDS | $ cat pid >> $DAEMON_PIDS |