2005-07-29 18:19:43 +04:00
|
|
|
#!/bin/sh
|
2005-06-22 06:41:57 +04:00
|
|
|
|
|
|
|
cat <<'EOF' > merge
|
|
|
|
#!/bin/sh
|
|
|
|
echo merging for `basename $1`
|
|
|
|
EOF
|
|
|
|
chmod +x merge
|
|
|
|
|
|
|
|
mkdir t
|
|
|
|
cd t
|
|
|
|
hg init
|
|
|
|
echo This is file a1 > a
|
|
|
|
hg add a
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "commit #0" -d "1000000 0"
|
2005-06-22 06:41:57 +04:00
|
|
|
echo This is file b1 > b
|
|
|
|
hg add b
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "commit #1" -d "1000000 0"
|
2005-06-22 06:41:57 +04:00
|
|
|
|
|
|
|
hg update 0
|
|
|
|
echo This is file c1 > c
|
|
|
|
hg add c
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "commit #2" -d "1000000 0"
|
2005-06-22 06:41:57 +04:00
|
|
|
echo This is file b1 > b
|
2005-09-14 03:38:27 +04:00
|
|
|
echo %% no merges expected
|
2006-05-15 08:07:34 +04:00
|
|
|
env HGMERGE=../merge hg merge 1
|
2005-06-22 06:41:57 +04:00
|
|
|
cd ..; /bin/rm -rf t
|
|
|
|
|
|
|
|
mkdir t
|
|
|
|
cd t
|
|
|
|
hg init
|
|
|
|
echo This is file a1 > a
|
|
|
|
hg add a
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "commit #0" -d "1000000 0"
|
2005-06-22 06:41:57 +04:00
|
|
|
echo This is file b1 > b
|
|
|
|
hg add b
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "commit #1" -d "1000000 0"
|
2005-06-22 06:41:57 +04:00
|
|
|
|
|
|
|
hg update 0
|
|
|
|
echo This is file c1 > c
|
|
|
|
hg add c
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "commit #2" -d "1000000 0"
|
2005-06-22 06:41:57 +04:00
|
|
|
echo This is file b2 > b
|
2005-12-15 07:19:03 +03:00
|
|
|
echo %% merge should fail
|
2006-05-15 08:07:34 +04:00
|
|
|
env HGMERGE=../merge hg merge 1
|
2005-12-15 07:19:03 +03:00
|
|
|
echo %% merge of b expected
|
2006-05-15 08:07:34 +04:00
|
|
|
env HGMERGE=../merge hg merge -f 1
|
2005-06-22 06:41:57 +04:00
|
|
|
cd ..; /bin/rm -rf t
|
2005-09-14 03:38:27 +04:00
|
|
|
echo %%
|
2005-06-22 06:41:57 +04:00
|
|
|
|
|
|
|
mkdir t
|
|
|
|
cd t
|
|
|
|
hg init
|
|
|
|
echo This is file a1 > a
|
|
|
|
hg add a
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "commit #0" -d "1000000 0"
|
2005-06-22 06:41:57 +04:00
|
|
|
echo This is file b1 > b
|
|
|
|
hg add b
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "commit #1" -d "1000000 0"
|
2005-06-22 06:41:57 +04:00
|
|
|
echo This is file b22 > b
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "commit #2" -d "1000000 0"
|
2005-06-22 06:41:57 +04:00
|
|
|
hg update 1
|
|
|
|
echo This is file c1 > c
|
|
|
|
hg add c
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "commit #3" -d "1000000 0"
|
2005-09-14 03:38:27 +04:00
|
|
|
|
|
|
|
echo 'Contents of b should be "this is file b1"'
|
2005-06-22 09:07:08 +04:00
|
|
|
cat b
|
2005-09-14 03:38:27 +04:00
|
|
|
|
2005-06-22 06:41:57 +04:00
|
|
|
echo This is file b22 > b
|
2005-12-15 07:19:03 +03:00
|
|
|
echo %% merge fails
|
2006-05-15 08:07:34 +04:00
|
|
|
env HGMERGE=../merge hg merge 2
|
2005-12-15 07:19:03 +03:00
|
|
|
echo %% merge expected!
|
2006-05-15 08:07:34 +04:00
|
|
|
env HGMERGE=../merge hg merge -f 2
|
2005-06-22 06:41:57 +04:00
|
|
|
cd ..; /bin/rm -rf t
|
|
|
|
|
|
|
|
mkdir t
|
|
|
|
cd t
|
|
|
|
hg init
|
|
|
|
echo This is file a1 > a
|
|
|
|
hg add a
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "commit #0" -d "1000000 0"
|
2005-06-22 06:41:57 +04:00
|
|
|
echo This is file b1 > b
|
|
|
|
hg add b
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "commit #1" -d "1000000 0"
|
2005-06-22 06:41:57 +04:00
|
|
|
echo This is file b22 > b
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "commit #2" -d "1000000 0"
|
2005-06-22 06:41:57 +04:00
|
|
|
hg update 1
|
|
|
|
echo This is file c1 > c
|
|
|
|
hg add c
|
2006-03-13 15:05:41 +03:00
|
|
|
hg commit -m "commit #3" -d "1000000 0"
|
2005-06-22 06:41:57 +04:00
|
|
|
echo This is file b33 > b
|
2005-12-15 07:19:03 +03:00
|
|
|
echo %% merge of b should fail
|
2006-05-15 08:07:34 +04:00
|
|
|
env HGMERGE=../merge hg merge 2
|
2005-12-15 07:19:03 +03:00
|
|
|
echo %% merge of b expected
|
2006-05-15 08:07:34 +04:00
|
|
|
env HGMERGE=../merge hg merge -f 2
|
2005-06-22 06:41:57 +04:00
|
|
|
cd ..; /bin/rm -rf t
|