Mercurial > public > mercurial-scm > hg
diff tests/hghave.py @ 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 | 46a0203dfb89 |
children | d4db88a26ad5 |
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():