# HG changeset patch # User Yuya Nishihara # Date 1478002473 -32400 # Node ID 389cbfe63586d2b4c53e3220fcc01b211906ba85 # Parent cac4ca036dff882c71f48f3130b72597d3e1fc64 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. diff -r cac4ca036dff -r 389cbfe63586 tests/hghave.py --- 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():