2006-08-19 01:49:12 +04:00
|
|
|
#!/bin/sh
|
|
|
|
# http://www.selenic.com/mercurial/bts/issue322
|
|
|
|
|
2006-08-19 02:53:14 +04:00
|
|
|
echo % file replaced with directory
|
|
|
|
|
2006-08-19 01:49:12 +04:00
|
|
|
hg init a
|
2007-06-21 11:25:49 +04:00
|
|
|
cd a
|
|
|
|
echo a > a
|
|
|
|
hg commit -Ama
|
|
|
|
rm a
|
|
|
|
mkdir a
|
2006-08-19 01:49:12 +04:00
|
|
|
echo a > a/a
|
|
|
|
|
2006-08-19 02:53:14 +04:00
|
|
|
echo % should fail - would corrupt dirstate
|
2006-08-19 01:49:12 +04:00
|
|
|
hg add a/a
|
2006-08-19 02:53:14 +04:00
|
|
|
|
2007-06-21 11:25:49 +04:00
|
|
|
cd ..
|
2006-08-19 02:53:14 +04:00
|
|
|
|
|
|
|
echo % directory replaced with file
|
|
|
|
|
|
|
|
hg init c
|
|
|
|
cd c
|
|
|
|
mkdir a
|
|
|
|
echo a > a/a
|
|
|
|
hg commit -Ama
|
|
|
|
|
2006-12-26 16:17:48 +03:00
|
|
|
rm -r a
|
2006-08-19 02:53:14 +04:00
|
|
|
echo a > a
|
|
|
|
|
|
|
|
echo % should fail - would corrupt dirstate
|
|
|
|
hg add a
|
|
|
|
|
2006-08-19 08:03:29 +04:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo % directory replaced with file
|
|
|
|
|
|
|
|
hg init d
|
|
|
|
cd d
|
|
|
|
mkdir b
|
|
|
|
mkdir b/c
|
|
|
|
echo a > b/c/d
|
|
|
|
hg commit -Ama
|
2006-12-26 16:17:48 +03:00
|
|
|
rm -r b
|
2006-08-19 08:03:29 +04:00
|
|
|
echo a > b
|
|
|
|
|
|
|
|
echo % should fail - would corrupt dirstate
|
|
|
|
hg add b
|
2006-08-19 02:53:14 +04:00
|
|
|
|
2006-08-19 08:03:29 +04:00
|
|
|
exit 0
|