sapling/tests/test-permissions

28 lines
517 B
Plaintext
Raw Normal View History

2005-11-03 11:45:54 +03:00
#!/bin/sh
hg init t
cd t
2005-11-03 11:45:54 +03:00
echo foo > a
hg add a
hg commit -m "1" -d "1000000 0"
2005-11-03 11:45:54 +03:00
hg verify
chmod -r .hg/store/data/a.i
2005-11-03 11:45:54 +03:00
hg verify 2>/dev/null || echo verify failed
chmod +r .hg/store/data/a.i
2005-11-03 11:45:54 +03:00
hg verify 2>/dev/null || echo verify failed
chmod -w .hg/store/data/a.i
2005-11-03 11:45:54 +03:00
echo barber > a
hg commit -m "2" -d "1000000 0" 2>/dev/null || echo commit failed
chmod -w .
2007-08-24 02:56:08 +04:00
hg diff --nodates
chmod +w .
chmod +w .hg/store/data/a.i
mkdir dir
touch dir/a
hg status
chmod -rx dir
hg status
# reenable perm to allow deletion
chmod +rx dir