Fossil SCM

fossil-scm / test / update-test-1.sh
Blame History Raw 45 lines
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-1.sh /home/drh/fossil/m1/fossil
7
#
8
export FOSSIL=$1
9
rm -rf aaa bbb update-test-1.fossil
10
11
# Create a test repository
12
$FOSSIL new update-test-1.fossil
13
14
# In checkout aaa, add file one.txt
15
mkdir aaa
16
cd aaa
17
$FOSSIL open ../update-test-1.fossil
18
echo one >one.txt
19
$FOSSIL add one.txt
20
$FOSSIL commit -m add-one --tag add-one
21
22
# Open checkout bbb.
23
mkdir ../bbb
24
cd ../bbb
25
$FOSSIL open ../update-test-1.fossil
26
27
# Back in aaa, add file two.txt
28
cd ../aaa
29
echo two >two.txt
30
$FOSSIL add two.txt
31
$FOSSIL commit -m add-two --tag add-two
32
33
# In bbb, delete file one.txt. Then update the change from aaa that
34
# adds file two. Verify that one.txt says deleted.
35
cd ../bbb
36
$FOSSIL rm one.txt
37
$FOSSIL changes
38
echo '========================================================================'
39
$FOSSIL update
40
echo '======== The previous should show "ADD two.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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button