Fossil SCM

fossil-scm / test / make-bundle-data.sh
Blame History Raw 31 lines
1
#!/bin/sh
2
# This script creates the two repositories used by the bundle test tools.
3
# Syntax: make-bundle-data.sh oldrepo.fossil newrepo.fossil
4
# Warning! The two repositories will be *destroyed*!
5
6
set -e -x
7
8
oldrepo=$(readlink -f "$1")
9
newrepo=$(readlink -f "$2")
10
11
tmpdir=/tmp/$$.make-bundle-data
12
13
rm -rf $oldrepo $newrepo $tmpdir
14
fossil init $oldrepo
15
mkdir $tmpdir
16
(cd $tmpdir && fossil open $oldrepo && fossil settings -R $oldrepo autosync off)
17
(cd $tmpdir && echo "empty" > 1 && fossil add 1 && fossil commit -m "Empty")
18
(cd $tmpdir && echo "data" >> 1 && fossil commit -m "Add: data")
19
(cd $tmpdir && echo "more data" >> 1 && fossil commit -m "Add: more data")
20
21
fossil clone $oldrepo $newrepo
22
rm -rf $tmpdir
23
mkdir $tmpdir
24
(cd $tmpdir && fossil open $newrepo && fossil settings -R $oldrepo autosync off)
25
(cd $tmpdir && echo "even more data" >> 1 && fossil commit -m "Clone, add: even more data")
26
(cd $tmpdir && fossil tag add branchpoint tip)
27
(cd $tmpdir && echo "new file" > 2 && fossil add 2 && fossil commit -m "New file")
28
(cd $tmpdir && fossil update branchpoint)
29
(cd $tmpdir && echo "branched data" >> 1 && fossil commit -b branch -m "Branch, add: branched data")
30
31

Keyboard Shortcuts

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