Mercurial > public > mercurial-scm > hg-stable
diff tests/test-sparse.t @ 33709:7dcb517122f9
sparse: properly error out when absolute paths are used
Current logic is misleading (it says it drops only absolute paths, but
it actually drops all of them), not cross-platform (does not support Windows)
and IMO just wrong (as it should just error out if absolute paths are given).
This commit fixes it.
author | Kostia Balytskyi <ikostia@fb.com> |
---|---|
date | Wed, 02 Aug 2017 15:05:21 -0700 |
parents | 258298f4712b |
children | e1c56486d1aa |
line wrap: on
line diff
--- a/tests/test-sparse.t Thu Aug 03 23:02:32 2017 +0900 +++ b/tests/test-sparse.t Wed Aug 02 15:05:21 2017 -0700 @@ -29,20 +29,22 @@ #if no-windows $ hg debugsparse --include /foo/bar - warning: paths cannot start with /, ignoring: ['/foo/bar'] + abort: paths cannot be absolute + [255] $ hg debugsparse --include '$TESTTMP/myrepo/hide' $ hg debugsparse --include '/root' - warning: paths cannot start with /, ignoring: ['/root'] + abort: paths cannot be absolute + [255] #else TODO: See if this can be made to fail the same way as on Unix $ hg debugsparse --include /c/foo/bar - abort: c:/foo/bar not under root '$TESTTMP/myrepo' (glob) + abort: paths cannot be absolute [255] $ hg debugsparse --include '$TESTTMP/myrepo/hide' $ hg debugsparse --include '/c/root' - abort: c:/root not under root '$TESTTMP/myrepo' (glob) + abort: paths cannot be absolute [255] #endif