tests/test-permissions
author Nicolas Dumazet <nicdumz.commits@gmail.com>
Wed, 21 Jul 2010 11:53:09 +0900
changeset 11699 da0b9109186d
parent 11663 c1b11ee12fe7
child 12156 4c94b6d0fb1c
permissions -rwxr-xr-x
mq: support "qimport --existing --name renametothis thatexistingpatch" Before this change, the command would abort with a not too clear "patch renametothis does not exist" error. This change makes: qimport --existing --name renametothis thatexistingpatch equivalent to: qimport --existing thatexistingpatch; qrename thatexistingpatch renametothis

#!/bin/sh

echo '% hg init t'
hg init t
cd t
echo foo > a
echo '% hg add a'
hg add a
echo '% hg commit'
hg commit -m "1" -d "1000000 0"
echo '% hg verify'
hg verify
chmod -r .hg/store/data/a.i
echo '% hg verify'
hg verify 2>/dev/null || echo verify failed
chmod +r .hg/store/data/a.i
echo '% hg verify'
hg verify 2>/dev/null || echo verify failed
chmod -w .hg/store/data/a.i
echo barber > a
echo '% hg commit'
hg commit -m "2" -d "1000000 0" 2>/dev/null || echo commit failed
chmod -w .
echo '% hg diff'
hg diff --nodates
chmod +w .

chmod +w .hg/store/data/a.i
mkdir dir
touch dir/a
echo '% hg status'
hg status
chmod -rx dir
echo '% hg status'
hg status
# reenable perm to allow deletion
chmod +rx dir