|
1
|
#!/bin/sh |
|
2
|
# |
|
3
|
# Run this script in an empty directory. A single argument is the full |
|
4
|
# pathname of the fossil binary. Example: |
|
5
|
# |
|
6
|
# sh update-test-2.sh /home/drh/fossil/m1/fossil |
|
7
|
# |
|
8
|
export FOSSIL=$1 |
|
9
|
rm -rf aaa bbb update-test-2.fossil |
|
10
|
|
|
11
|
# Create a test repository |
|
12
|
$FOSSIL new update-test-2.fossil |
|
13
|
|
|
14
|
# In checkout aaa, add file one.txt. |
|
15
|
mkdir aaa |
|
16
|
cd aaa |
|
17
|
$FOSSIL open ../update-test-2.fossil |
|
18
|
echo one >one.txt |
|
19
|
$FOSSIL add one.txt |
|
20
|
$FOSSIL commit -m add-one --tag add-one |
|
21
|
|
|
22
|
# Create checkout bbb. |
|
23
|
mkdir ../bbb |
|
24
|
cd ../bbb |
|
25
|
$FOSSIL open ../update-test-2.fossil |
|
26
|
|
|
27
|
# Back in aaa, make changes to one.txt. Add file two.txt. |
|
28
|
cd ../aaa |
|
29
|
echo change >>one.txt |
|
30
|
echo two >two.txt |
|
31
|
$FOSSIL add two.txt |
|
32
|
$FOSSIL commit -m 'chng one and add two' --tag add-two |
|
33
|
|
|
34
|
# In bbb, remove one.txt, then update. |
|
35
|
cd ../bbb |
|
36
|
$FOSSIL rm one.txt |
|
37
|
$FOSSIL changes |
|
38
|
echo '========================================================================' |
|
39
|
$FOSSIL update |
|
40
|
echo '======== Previous should show "ADD two.txt" and conflict on one.txt ====' |
|
41
|
$FOSSIL changes |
|
42
|
echo '======== The previous should show "DELETE one.txt" =====================' |
|
43
|
$FOSSIL commit --test -m 'check-in' |
|
44
|
echo '======== Only file two.txt is checked in ===============================' |
|
45
|
|