mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
3d461ae600
Summary: Enhance check-ext script to be more strict: - Only one foreign extension is allowed: `remotenames` - Require explicit path for in-repo extensions to avoid wrong extensions being tested This would make the test more predicatable since system extensions will be less likely to be imported. Explicit path is better than setting `PYTHONPATH` since `hgext/name.py` could override `hgext3rd/name.py` regardless of `PYTHONPATH`. Test Plan: arc unit Reviewers: phillco, durham, ikostia, #mercurial, stash Reviewed By: stash Subscribers: medson, mjpieters Differential Revision: https://phabricator.intern.facebook.com/D5271430 Signature: t1:5271430:1497861776:7dd35ec7c522cd9b26aa0871cb4306b4f1b8993a
48 lines
836 B
Perl
48 lines
836 B
Perl
Setup
|
|
|
|
$ PYTHONPATH=$TESTDIR/..:$PYTHONPATH
|
|
$ export PYTHONPATH
|
|
|
|
Check diagnosis, debugging information
|
|
1) Setup configuration
|
|
$ mkcommit() {
|
|
> echo "$1" > "$1"
|
|
> hg add "$1"
|
|
> echo "add $1" > msg
|
|
> echo "" >> msg
|
|
> hg ci -l msg
|
|
> }
|
|
|
|
2) Set up the repo
|
|
|
|
$ mkdir cachetesting
|
|
$ cd cachetesting
|
|
$ hg init
|
|
$ cat >> .hg/hgrc << EOF
|
|
> [extensions]
|
|
> fastmanifest=$TESTDIR/../fastmanifest
|
|
> [fastmanifest]
|
|
> cachecutoffdays=-1
|
|
> randomorder=False
|
|
> EOF
|
|
|
|
$ mkcommit a
|
|
$ mkcommit b
|
|
$ mkcommit c
|
|
$ mkcommit d
|
|
$ mkcommit e
|
|
$ deauthorize() {
|
|
> chmod 100 .hg
|
|
> }
|
|
|
|
$ authorize() {
|
|
> chmod 755 .hg
|
|
> }
|
|
$ deauthorize
|
|
$ hg debugcachemanifest -a
|
|
warning: not using fastmanifest
|
|
(make sure that .hg/store is writeable)
|
|
$ authorize
|
|
$ hg debugcachemanifest -a
|
|
|