test-mq.t failure and how to avoid it
mads at kiilerich.com
Wed Dec 8 09:55:20 CST 2010
On 12/08/2010 04:21 PM, Giorgos Keramidas wrote:
> I tried creating an hg repository as a test for tracking the files of a
> virtual machine's root filesystem, but this seems to be a bad idea for
> the hg test-suite. One of the tests tries to create an mq-subrepo in a
> directory that has no .hg root.
> The expected error message is:
> abort: there is no Mercurial repository here (.hg not found)
> But if there's an /.hg repo at the root of the filesystem, e.g. one
> owned by the 'root:wheel' user the test command fails with:
> $ hg init --mq
> abort: Permission denied: /.hg/patches
> Other than wiping the "/.hg" tree or temporarily moving it away is there
> any way to avoid this sort of test confusion?
Some tests have
$ "$TESTDIR/hghave" no-outer-repo || exit 80
for this reason, but that has apparently not been added all places where
it is needed.
Some kind of HG_DONOTSEARCHFORDOTHGABOVETHIS environment variable could
be a nicer solution.
More information about the Mercurial-devel