root / bigUnrevert.sh

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
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env bash

## 
## bigUnrevert
## ├── R1
## │   ├── _darcs
## │   │   └── ...
## │   ├── P_R2
## │   ├── r1_0
## │   ├── r1_1
## │   .
## │   .
## │   .
## │   ├── r1_10
## │   └── r2_0
## └── R2
##     ├── _darcs
##     │   └── ...
##     ├── r1_0
##     └── r2_0
##

. ./utils_lib.sh

mkdir bigUnrevert
cd bigUnrevert

darcs init R1
cd R1

make_n_files "r1_" 0 0
darcs_add "r1_" 0

cd ..

darcs_n_clones "R1" "R" 2 2

cd R2

make_n_files "r2_" 0 0
darcs_add "r2_" 0
darcs tag --author=me "r2_tag"
darcs send --author=me -a --no-edit-description -o "../R1/P_R2"

cd .. ; cd R1

make_n_files "r1_" 1 10
darcs_n_adds "r1_" 1 10

darcs apply "P_R2"

# We modify r1_0, r1_1,..., r1_10, appending 30000 lines of words of length 30.
modify_n_files "r1_" 0 10 30000
darcs revert -a

cd ..