comparison tests/test-merge1.t @ 39478:c4a7ba10cdd7

tests: conditionalize an error message about unlinking a non empty directory The message on Windows comes from win32.unlink(). It looks like os.unlink() on posix platforms is a simple call to unlink(3), which turns into unlinkat(2). Since there's a comment in one of the tests that the message should be improved, I don't think it's worth adding a check in win32.unlink() to see if it's empty, if that function is always going to fail on a directory. (It seems like the POSIX spec allows unlinking directories though.)
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 07 Sep 2018 23:39:49 -0400
parents 8c6775e812d8
children cb1329738d64
comparison
equal deleted inserted replaced
39477:8eb2145ff0fb 39478:c4a7ba10cdd7
28 Test interrupted updates by having a non-empty dir with the same name as one 28 Test interrupted updates by having a non-empty dir with the same name as one
29 of the files in a commit we're updating to 29 of the files in a commit we're updating to
30 30
31 $ mkdir b && touch b/nonempty 31 $ mkdir b && touch b/nonempty
32 $ hg up 32 $ hg up
33 abort: Directory not empty: '$TESTTMP/t/b' 33 abort: Unlinking directory not permitted: '$TESTTMP/t/b' (windows !)
34 abort: Directory not empty: '$TESTTMP/t/b' (no-windows !)
34 [255] 35 [255]
35 $ hg ci 36 $ hg ci
36 abort: last update was interrupted 37 abort: last update was interrupted
37 (use 'hg update' to get a consistent checkout) 38 (use 'hg update' to get a consistent checkout)
38 [255] 39 [255]