2005-07-01 10:22:27 +04:00
|
|
|
#!/bin/sh
|
2005-06-15 01:28:42 +04:00
|
|
|
|
2007-04-17 03:17:39 +04:00
|
|
|
HGMERGE=true; export HGMERGE
|
|
|
|
|
2005-07-29 18:19:43 +04:00
|
|
|
set -e
|
2005-06-15 01:28:42 +04:00
|
|
|
mkdir r1
|
|
|
|
cd r1
|
|
|
|
hg init
|
|
|
|
echo a > a
|
|
|
|
hg addremove
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "1" -d "1000000 0"
|
2005-06-15 01:28:42 +04:00
|
|
|
|
2005-06-27 03:20:46 +04:00
|
|
|
hg clone . ../r2
|
|
|
|
cd ../r2
|
2005-06-15 01:28:42 +04:00
|
|
|
hg up
|
|
|
|
echo abc > a
|
2006-09-26 03:05:24 +04:00
|
|
|
hg diff --nodates
|
2005-06-15 01:28:42 +04:00
|
|
|
|
|
|
|
cd ../r1
|
|
|
|
echo b > b
|
|
|
|
echo a2 > a
|
|
|
|
hg addremove
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "2" -d "1000000 0"
|
2005-06-15 01:28:42 +04:00
|
|
|
|
|
|
|
cd ../r2
|
|
|
|
hg -q pull ../r1
|
|
|
|
hg status
|
2006-02-01 10:46:24 +03:00
|
|
|
hg parents
|
2005-07-03 10:54:35 +04:00
|
|
|
hg --debug up
|
2006-02-01 10:46:24 +03:00
|
|
|
hg parents
|
|
|
|
hg --debug up 0
|
|
|
|
hg parents
|
2006-05-15 08:07:34 +04:00
|
|
|
hg --debug merge || echo failed
|
2006-02-01 10:46:24 +03:00
|
|
|
hg parents
|
|
|
|
hg --debug up
|
2005-06-15 01:28:42 +04:00
|
|
|
hg parents
|
|
|
|
hg -v history
|
2006-09-26 03:05:24 +04:00
|
|
|
hg diff --nodates
|
2005-06-15 01:28:42 +04:00
|
|
|
|
2006-02-01 10:46:24 +03:00
|
|
|
# create a second head
|
|
|
|
cd ../r1
|
|
|
|
hg up 0
|
|
|
|
echo b2 > b
|
|
|
|
echo a3 > a
|
|
|
|
hg addremove
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "3" -d "1000000 0"
|
2006-02-01 10:46:24 +03:00
|
|
|
|
|
|
|
cd ../r2
|
|
|
|
hg -q pull ../r1
|
|
|
|
hg status
|
|
|
|
hg parents
|
|
|
|
hg --debug up || echo failed
|
2006-05-15 08:07:34 +04:00
|
|
|
hg --debug merge || echo failed
|
|
|
|
hg --debug merge -f
|
2006-02-01 10:46:24 +03:00
|
|
|
hg parents
|
2006-09-26 03:05:24 +04:00
|
|
|
hg diff --nodates
|
2006-04-14 02:41:50 +04:00
|
|
|
|
|
|
|
# test a local add
|
|
|
|
cd ..
|
|
|
|
hg init a
|
|
|
|
hg init b
|
|
|
|
echo a > a/a
|
|
|
|
echo a > b/a
|
|
|
|
hg --cwd a commit -A -m a
|
|
|
|
cd b
|
2007-06-21 11:25:49 +04:00
|
|
|
hg add a
|
2006-04-14 02:41:50 +04:00
|
|
|
hg pull -u ../a
|
|
|
|
hg st
|