sapling/tests/test-requires.t
Durham Goode c58a61d5cd init: add hgsql requirement during repo init and clone
Summary:
We don't want to allow commands to run in the repo if hgsql is not
enabled, so let's add a requirement.

This will not affect existing repositories, since they don't have the flag in
their requires, but the flag can be added manually once this is deployed.

Test Plan: Added a test

Reviewers: #sourcecontrol, ttung, simonfar

Reviewed By: simonfar

Subscribers: simonfar

Differential Revision: https://phabricator.intern.facebook.com/D3239263

Signature: t1:3239263:1461923217:b8fb59498292e1f9d317d98d5de7ce8513685ba6
2016-04-29 09:55:23 -07:00

28 lines
629 B
Perl

$ . "$TESTDIR/library.sh"
# Populate the db with an initial commit
$ initclient client
$ cd client
$ echo x > x
$ hg commit -qAm x
$ cd ..
$ initserver master masterrepo
$ cd master
$ hg log
$ hg pull -q ../client
Test that hgsql is a requirement
$ hg log -r tip --config extensions.hgsql=!
abort: repository requires features unknown to this Mercurial: hgsql!
(see https://mercurial-scm.org/wiki/MissingRequirement for more information)
[255]
$ hg log -r tip
changeset: 0:b292c1e3311f
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: x