mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +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
86 lines
3.5 KiB
Perl
86 lines
3.5 KiB
Perl
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit
|
|
|
|
Test of warning for evolve users when inhibit is enabled
|
|
$ cat >> $HGRCPATH <<EOF
|
|
> [ui]
|
|
> username = nobody <no.reply@fb.com>
|
|
> [experimental]
|
|
> evolution= all
|
|
> [inhibit]
|
|
> cutoff=2015-07-04
|
|
> [extensions]
|
|
> inhibit=
|
|
> directaccess=
|
|
> evolve=
|
|
> EOF
|
|
$ echo "inhibitwarn = $TESTDIR/../hgext3rd/inhibitwarn.py" >> $HGRCPATH
|
|
$ hg init repo
|
|
$ cd repo
|
|
$ mkcommit() {
|
|
> echo "$1" > "$1"
|
|
> hg add "$1"
|
|
> hg ci -m "add $1"
|
|
> }
|
|
|
|
$ mkcommit a
|
|
$ mkcommit b
|
|
$ mkcommit c
|
|
$ mkcommit d
|
|
$ mkcommit e
|
|
$ hg log -r .
|
|
changeset: 4:9d206ffc875e
|
|
tag: tip
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: add e
|
|
|
|
|
|
One marker after the cutoff date should show no warning
|
|
$ hg prune -d '2015-07-16' -r .
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
working directory now at 47d2a3944de8
|
|
1 changesets pruned
|
|
$ rm .hg/store/obsstore # Since we look only at the first marker
|
|
$ hg log -r .
|
|
changeset: 3:47d2a3944de8
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: add d
|
|
|
|
One marker before the cutoff date should show a warning
|
|
$ hg prune -d '2015-07-03' -r .
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
working directory now at 4538525df7e2
|
|
1 changesets pruned
|
|
$ hg log -r .
|
|
|
|
+------------------------------------------------------------------------------+
|
|
|You seems to be a beta user of Changeset Evolution |
|
|
|https://fb.facebook.com/groups/630370820344870/ |
|
|
| |
|
|
|We just rolled out a major change to our mercurial |
|
|
|https://fb.facebook.com/groups/scm.fyi/permalink/711128702353004/ |
|
|
| |
|
|
|The rollout contains a lightweight version of Evolution that break your usual |
|
|
|workflow using the "hg evolve" commands: |
|
|
| https://fb.facebook.com/groups/630370820344870/permalink/907861022595847/ |
|
|
| |
|
|
|If you want to keep using evolve run `hg config -e` and add this to your |
|
|
|config: |
|
|
|[extensions] |
|
|
|inhibit=! |
|
|
|directaccess=! |
|
|
|[experimental] |
|
|
|evolution=all |
|
|
| |
|
|
|If you have no recollection of using evolution or stopped using it. run |
|
|
|`hg config -e` and add this to your config: |
|
|
|[inhibit] |
|
|
|bypass-warning=True |
|
|
+------------------------------------------------------------------------------+
|
|
changeset: 2:4538525df7e2
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: add c
|
|
|