tests/test-audit-path
author Edouard Gomez <ed.gomez@free.fr>
Sun, 04 Jan 2009 02:36:48 +0100
changeset 7583 77fec2d270ae
parent 7554 11a4eb81fb4f
child 7586 e9d3a11eacad
permissions -rwxr-xr-x
convert/gnuarch: parse continuation-of revisions in gnuarch source In GNU Arch, continuation-of was often used for: - tagging revisions - continue working on a project in a new archive, because arch was scaling poorly in revision numbers (cat-logs were slow to be parsed and scanned through) - very similar to the previous point, fork his own branch of a project. Parsing this header information will allow to 'follow' new history because it often hints at older/forked/personal revision trees. This patch however just implements the parsing of the continuation-of header. A followup patch will implement the proper use of this new information.

#!/bin/sh

hg init

echo % should fail
hg add .hg/00changelog.i

mkdir a
echo a > a/a
hg ci -Ama
ln -s a b
echo b > a/b

echo % should fail
hg add b/b

echo % should succeed
hg add b

echo % should still fail - maybe
hg add b/b

echo % unbundle tampered bundle
hg init target
cd target
hg unbundle $TESTDIR/tampered.hg

echo % attack .hg/test
hg manifest -r0
hg update -Cr0

echo % attack foo/.hg/test
hg manifest -r1
hg update -Cr1

echo % attack back/test where back symlinks to ..
hg manifest -r2
hg update -Cr2

echo % attack ../test
hg manifest -r3
hg update -Cr3

exit 0