Mercurial > public > mercurial-scm > hg-stable
diff tests/test-paths.t @ 46827:1ecf082386b7
path: forbid chaining `path://` definitions
To have `path://xxx` referencing paths that use `path://` too, we need to
analyze dependencies to initialize them in the right order (and to detect
cycle).
I don't want to deal with that right now, so I just disallow it for now.
Differential Revision: https://phab.mercurial-scm.org/D10264
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 23 Mar 2021 23:55:33 +0100 |
parents | 83b0a5c0dfec |
children | 395cf404e76a |
line wrap: on
line diff
--- a/tests/test-paths.t Thu Mar 18 12:02:01 2021 +0100 +++ b/tests/test-paths.t Tue Mar 23 23:55:33 2021 +0100 @@ -334,3 +334,39 @@ adding manifests adding file changes added 5 changesets with 0 changes to 0 files (+1 heads) + +Test chaining path:// definition +-------------------------------- + +This is currently unsupported, but feel free to implement the necessary +dependency detection. + + $ cat << EOF >> .hg/hgrc + > chain_path=path://other_default + > EOF + + $ hg id + 000000000000 + $ hg path + abort: cannot use `path://other_default`, "other_default" is also define as a `path://` + [255] + $ hg pull chain_path + abort: cannot use `path://other_default`, "other_default" is also define as a `path://` + [255] + +Doing an actual circle should always be an issue + + $ cat << EOF >> .hg/hgrc + > rock=path://cissors + > cissors=path://paper + > paper=://rock + > EOF + + $ hg id + 000000000000 + $ hg path + abort: cannot use `path://other_default`, "other_default" is also define as a `path://` + [255] + $ hg pull chain_path + abort: cannot use `path://other_default`, "other_default" is also define as a `path://` + [255]