Mercurial > hg-stable
changeset 30242:389cbfe63586 stable
hghave: fix 'rmcwd' to ensure temporary directory is removed
On platforms where cwd can't be removed, it should try rmdir() after chdir
to the original cwd.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 01 Nov 2016 21:14:33 +0900 |
parents | cac4ca036dff |
children | 7b7bd704adbd |
files | tests/hghave.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/hghave.py Mon Oct 31 13:43:48 2016 +0100 +++ b/tests/hghave.py Tue Nov 01 21:14:33 2016 +0900 @@ -360,6 +360,11 @@ return False finally: os.chdir(ocwd) + # clean up temp dir on platforms where cwd can't be removed + try: + os.rmdir(temp) + except OSError: + pass @check("tla", "GNU Arch tla client") def has_tla():