mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +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
57 lines
1.5 KiB
Raku
57 lines
1.5 KiB
Raku
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
|
|
> blackbox=
|
|
> [blackbox]
|
|
> maxfiles=1
|
|
> maxsize=5242880
|
|
> track=fastmanifest
|
|
> [fastmanifest]
|
|
> cacheonchange=True
|
|
> cachecutoffdays=-1
|
|
> randomorder=False
|
|
> EOF
|
|
|
|
$ mkcommit a
|
|
$ mkcommit b
|
|
$ mkcommit c
|
|
$ mkcommit d
|
|
$ cat .hg/blackbox.log | grep "FM" | sed "s/.*)>//g" | grep -v "running"
|
|
FM: caching trigger: commit
|
|
FM: triggering caching for $TESTTMP/cachetesting
|
|
FM: trying to cache [0]
|
|
FM: cached(rev,man) 0->a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
|
|
FM: caching trigger: commit
|
|
FM: triggering caching for $TESTTMP/cachetesting
|
|
FM: trying to cache [1, 0]
|
|
FM: cached(rev,man) 1->a539ce0c1a22b0ecf34498f9f5ce8ea56df9ecb7
|
|
FM: skip(rev, man) 0->a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
|
|
FM: caching trigger: commit
|
|
FM: triggering caching for $TESTTMP/cachetesting
|
|
FM: trying to cache [2, 1, 0]
|
|
FM: cached(rev,man) 2->e3738bf5439958f89499a656982023aba57b076e
|
|
FM: skip(rev, man) 1->a539ce0c1a22b0ecf34498f9f5ce8ea56df9ecb7
|
|
FM: skip(rev, man) 0->a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
|
|
FM: caching trigger: commit
|
|
FM: triggering caching for $TESTTMP/cachetesting
|