Mercurial > hg
diff 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 |
line wrap: on
line diff
--- a/tests/test-merge1.t Fri Sep 07 14:48:38 2018 -0700 +++ b/tests/test-merge1.t Fri Sep 07 23:39:49 2018 -0400 @@ -30,7 +30,8 @@ $ mkdir b && touch b/nonempty $ hg up - abort: Directory not empty: '$TESTTMP/t/b' + abort: Unlinking directory not permitted: '$TESTTMP/t/b' (windows !) + abort: Directory not empty: '$TESTTMP/t/b' (no-windows !) [255] $ hg ci abort: last update was interrupted