Fossil SCM

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

Keyboard Shortcuts

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