Mercurial > hg
view tests/test-import-unknown.t @ 45513:22140fd783d2
run-test: allow relative path in `--blacklist` and `--whitelist` (issue6351)
When specifying a test with `--blacklist` or `--whitelist` with path relatives
to the repository root (eg: `tests/test-check-commit.t`) the file is not taken
into account. It only works when the name of the test is given.
It would be better if `--blacklist` and `--whitelist` behaviors where compatible
with `--test-list`.
This patch allows to use relative path with `--blacklist` and `--whitelist`
while staying compatible with the old behavior by checking the test relative
path in addition to its name.
Differential Revision: https://phab.mercurial-scm.org/D9024
author | Antoine cezar<acezar@chwitlabs.fr> |
---|---|
date | Wed, 16 Sep 2020 19:32:53 +0200 |
parents | f2719b387380 |
children | 6a454e7053a1 |
line wrap: on
line source
$ cat <<EOF >> $HGRCPATH > [extensions] > purge = > EOF $ hg init test $ cd test $ echo a > changed $ echo a > removed $ echo a > source $ hg ci -Am addfiles adding changed adding removed adding source $ echo a >> changed $ echo a > added $ hg add added $ hg rm removed $ hg cp source copied $ hg diff --git > ../unknown.diff Test adding on top of an unknown file $ hg up -qC 0 $ hg purge $ echo a > added $ hg import --no-commit ../unknown.diff applying ../unknown.diff file added already exists 1 out of 1 hunks FAILED -- saving rejects to file added.rej abort: patch failed to apply [255] Test modifying an unknown file $ hg revert -aq $ hg purge $ hg rm changed $ hg ci -m removechanged $ echo a > changed $ hg import --no-commit ../unknown.diff applying ../unknown.diff abort: cannot patch changed: file is not tracked [255] Test removing an unknown file $ hg up -qC 0 $ hg purge $ hg rm removed $ hg ci -m removeremoved created new head $ echo a > removed $ hg import --no-commit ../unknown.diff applying ../unknown.diff abort: cannot patch removed: file is not tracked [255] Test copying onto an unknown file $ hg up -qC 0 $ hg purge $ echo a > copied $ hg import --no-commit ../unknown.diff applying ../unknown.diff abort: cannot create copied: destination already exists [255] $ cd ..