File: commit_again.sh

package info (click to toggle)
ori 0.8.1%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,204 kB
  • ctags: 2,659
  • sloc: cpp: 22,383; ansic: 5,870; sh: 451; python: 205; makefile: 21
file content (44 lines) | stat: -rw-r--r-- 1,024 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# New file, new dir
cd $SOURCE_FILES
echo "New file" > $SOURCE_FILES/new
mkdir $SOURCE_FILES/new_dir

# Modify, delete
echo "Changed" > $SOURCE_FILES/a/a.txt
echo "Changed dir a" > $SOURCE_FILES/a/b.txt
rm $SOURCE_FILES/a/empty

# Replace file with dir
rm $SOURCE_FILES/b/b.txt
mkdir $SOURCE_FILES/b/b.txt
touch $SOURCE_FILES/b/b.txt/file

# Replace dir with file
rmdir $SOURCE_FILES/a/empty_dir
echo "New file" > $SOURCE_FILES/a/empty_dir

# Change LargeBlob
$PYTHON $SCRIPTS/changefile.py "$SOURCE_FILES/file10.tst"
echo "a" >> $SOURCE_FILES/file10.tst

# Copy changes to repo
rsync -rcv --delete --exclude=".ori" $SOURCE_FILES/ $SOURCE_REPO/

# Status, commit
echo "Committing changes"
cd $SOURCE_REPO
$ORI_EXE status
$ORI_EXE commit
$ORI_EXE verify
$ORI_EXE status
$ORI_EXE stats

$PYTHON $SCRIPTS/compare.py "$SOURCE_FILES" "$SOURCE_REPO"

echo "Checking out again"
cd $SOURCE_REPO
rm -rf $SOURCE_REPO/*
$ORI_EXE checkout
$PYTHON $SCRIPTS/compare.py "$SOURCE_FILES" "$SOURCE_REPO"

bash -e $SCRIPTS/verify_refcounts.sh