From 4f49b16079b27d7ce633619e4cddfdf2bffbc952 Mon Sep 17 00:00:00 2001 From: cashmere Date: Fri, 4 Sep 2026 09:05:24 +0200 Subject: initial commit --- test/update-test-2.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 test/update-test-2.sh (limited to 'test/update-test-2.sh') diff --git a/test/update-test-2.sh b/test/update-test-2.sh new file mode 100644 index 0000000..68a4ee7 --- /dev/null +++ b/test/update-test-2.sh @@ -0,0 +1,44 @@ +#!/bin/sh +# +# Run this script in an empty directory. A single argument is the full +# pathname of the fossil binary. Example: +# +# sh update-test-2.sh /home/drh/fossil/m1/fossil +# +export FOSSIL=$1 +rm -rf aaa bbb update-test-2.fossil + +# Create a test repository +$FOSSIL new update-test-2.fossil + +# In checkout aaa, add file one.txt. +mkdir aaa +cd aaa +$FOSSIL open ../update-test-2.fossil +echo one >one.txt +$FOSSIL add one.txt +$FOSSIL commit -m add-one --tag add-one + +# Create checkout bbb. +mkdir ../bbb +cd ../bbb +$FOSSIL open ../update-test-2.fossil + +# Back in aaa, make changes to one.txt. Add file two.txt. +cd ../aaa +echo change >>one.txt +echo two >two.txt +$FOSSIL add two.txt +$FOSSIL commit -m 'chng one and add two' --tag add-two + +# In bbb, remove one.txt, then update. +cd ../bbb +$FOSSIL rm one.txt +$FOSSIL changes +echo '========================================================================' +$FOSSIL update +echo '======== Previous should show "ADD two.txt" and conflict on one.txt ====' +$FOSSIL changes +echo '======== The previous should show "DELETE one.txt" =====================' +$FOSSIL commit --test -m 'check-in' +echo '======== Only file two.txt is checked in ===============================' -- cgit v1.3.1