Mercurial > hg
view tests/test-nested-repo.t @ 44943:9e5b4dbe8ff2
localrepo: handle ValueError during repository opening
Python 3.8 can raise ValueError on attempt of an I/O operation
against an illegal path. This was causing test-remotefilelog-gc.t
to fail on Python 3.8.
This commit teaches repository opening to handle ValueError
and re-raise an Abort on failure.
An arguably better solution would be to implement this logic
in the vfs layer. But that seems like a bag of worms and I don't
want to go down that rabbit hole. Until users report uncaught
ValueError exceptions in the wild, I think it is fine to patch
this at the only occurrence our test harness is finding it.
Differential Revision: https://phab.mercurial-scm.org/D7944
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 18 Jan 2020 10:07:07 -0800 |
parents | 4441705b7111 |
children |
line wrap: on
line source
$ hg init a $ cd a $ hg init b $ echo x > b/x Should print nothing: $ hg add b $ hg st $ echo y > b/y $ hg st Should fail: $ hg st b/x abort: path 'b/x' is inside nested repo 'b' [255] $ hg add b/x abort: path 'b/x' is inside nested repo 'b' [255] Should fail: $ hg add b b/x abort: path 'b/x' is inside nested repo 'b' [255] $ hg st Should arguably print nothing: $ hg st b $ echo a > a $ hg ci -Ama a Should fail: $ hg mv a b abort: path 'b/a' is inside nested repo 'b' [255] $ hg st $ cd ..