2005-08-28 09:04:17 +04:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
hg init
|
|
|
|
echo foo > foo
|
2007-07-03 10:06:40 +04:00
|
|
|
echo "# should fail - foo is not managed"
|
|
|
|
hg mv foo bar
|
|
|
|
hg st -A
|
2005-08-28 09:04:17 +04:00
|
|
|
hg add foo
|
2007-07-03 10:06:40 +04:00
|
|
|
echo "# dry-run; print a warning that this is not a real copy; foo is added"
|
|
|
|
hg mv --dry-run foo bar
|
|
|
|
hg st -A
|
|
|
|
echo "# should print a warning that this is not a real copy; bar is added"
|
|
|
|
hg mv foo bar
|
|
|
|
hg st -A
|
|
|
|
echo "# should print a warning that this is not a real copy; foo is added"
|
|
|
|
hg cp bar foo
|
|
|
|
hg rm -f bar
|
|
|
|
rm bar
|
|
|
|
hg st -A
|
2009-04-26 16:29:02 +04:00
|
|
|
hg commit -m1
|
2005-08-28 09:04:17 +04:00
|
|
|
|
2007-07-03 10:06:40 +04:00
|
|
|
echo "# dry-run; should show that foo is clean"
|
|
|
|
hg copy --dry-run foo bar
|
|
|
|
hg st -A
|
2005-08-28 09:04:17 +04:00
|
|
|
echo "# should show copy"
|
|
|
|
hg copy foo bar
|
2007-07-03 10:06:40 +04:00
|
|
|
hg st -C
|
2005-08-28 09:04:17 +04:00
|
|
|
|
|
|
|
echo "# shouldn't show copy"
|
2009-04-26 16:29:02 +04:00
|
|
|
hg commit -m2
|
2007-07-03 10:06:40 +04:00
|
|
|
hg st -C
|
2005-08-28 09:04:17 +04:00
|
|
|
|
|
|
|
echo "# should match"
|
2006-12-01 15:34:09 +03:00
|
|
|
hg debugindex .hg/store/data/foo.i
|
2005-08-28 09:04:17 +04:00
|
|
|
hg debugrename bar
|
|
|
|
|
|
|
|
echo bleah > foo
|
|
|
|
echo quux > bar
|
2009-04-26 16:29:02 +04:00
|
|
|
hg commit -m3
|
2005-08-28 09:04:17 +04:00
|
|
|
|
|
|
|
echo "# should not be renamed"
|
|
|
|
hg debugrename bar
|
|
|
|
|
2005-09-15 01:29:02 +04:00
|
|
|
hg copy -f foo bar
|
2005-08-28 09:04:17 +04:00
|
|
|
echo "# should show copy"
|
2007-07-03 10:06:40 +04:00
|
|
|
hg st -C
|
2009-04-26 16:29:02 +04:00
|
|
|
hg commit -m3
|
2005-08-28 09:04:17 +04:00
|
|
|
|
|
|
|
echo "# should show no parents for tip"
|
2006-12-01 15:34:09 +03:00
|
|
|
hg debugindex .hg/store/data/bar.i
|
2005-08-28 09:04:17 +04:00
|
|
|
echo "# should match"
|
2006-12-01 15:34:09 +03:00
|
|
|
hg debugindex .hg/store/data/foo.i
|
2005-08-28 09:04:17 +04:00
|
|
|
hg debugrename bar
|
|
|
|
|
|
|
|
echo "# should show no copies"
|
2007-07-03 10:06:40 +04:00
|
|
|
hg st -C
|
2005-08-28 18:37:24 +04:00
|
|
|
|
2007-04-25 05:43:18 +04:00
|
|
|
echo "# copy --after on an added file"
|
|
|
|
cp bar baz
|
|
|
|
hg add baz
|
|
|
|
hg cp -A bar baz
|
|
|
|
hg st -C
|
|
|
|
|
2007-06-22 06:42:06 +04:00
|
|
|
echo "# foo was clean:"
|
|
|
|
hg st -AC foo
|
|
|
|
echo "# but it's considered modified after a copy --after --force"
|
|
|
|
hg copy -Af bar foo
|
|
|
|
hg st -AC foo
|
|
|
|
|
2005-08-28 18:37:24 +04:00
|
|
|
exit 0
|