mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
3884602d28
Summary: It's a common mistake that our tests require foreign extensions (namely evolve and remotenames) without checking them first. This diff adds checks to catch these mistakes, adds missing checks, and unifies our checking logic using `require-ext.sh`, which is aware of `hgext3rd` and prints skip message. This affects `arc lint` so hopefully our new testing code would be free of this kind of mistakes. Test Plan: `arc lint` would catch errors Reviewers: #mercurial, ttung, rmcelroy Reviewed By: rmcelroy Subscribers: rmcelroy, mjpieters Differential Revision: https://phabricator.intern.facebook.com/D3550977 Signature: t1:3550977:1468455857:e849dfd9e3cbc446cc6e6c662050ee88a3366e6c
33 lines
852 B
Perl
33 lines
852 B
Perl
Skip test if remotenames not present
|
|
$ . $TESTDIR/require-ext.sh remotenames
|
|
|
|
Set up extensions (order is important here, we must test tweakdefaults loading last)
|
|
$ extpath=`dirname $TESTDIR`
|
|
$ cp $extpath/hgext3rd/tweakdefaults.py $TESTTMP # use $TESTTMP substitution in message
|
|
$ cat >> $HGRCPATH << EOF
|
|
> [extensions]
|
|
> rebase=
|
|
> remotenames=
|
|
> tweakdefaults=$TESTTMP/tweakdefaults.py
|
|
> EOF
|
|
|
|
Run test
|
|
$ hg init repo
|
|
$ cd repo
|
|
$ touch a
|
|
$ hg commit -Aqm a
|
|
$ touch b
|
|
$ hg commit -Aqm b
|
|
$ hg bookmark AB
|
|
$ hg up ".^"
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
(leaving bookmark AB)
|
|
$ touch c
|
|
$ hg commit -Aqm c
|
|
$ hg bookmark C -t AB
|
|
$ hg rebase
|
|
rebasing 2:d5e255ef74f8 "c" (tip C)
|
|
saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d5e255ef74f8-7d2cc323-backup.hg (glob)
|
|
|
|
|