File: conflict-fight.sh

package info (click to toggle)
darcs 2.0.2-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 6,400 kB
  • ctags: 1,048
  • sloc: haskell: 24,937; perl: 9,736; sh: 3,369; ansic: 1,913; makefile: 17; xml: 14
file content (78 lines) | stat: -rw-r--r-- 1,113 bytes parent folder | download | duplicates (4)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/env bash

set -ev

rm -rf temp0 temp1 temp2

# step 1
mkdir temp0
cd temp0
darcs init --darcs-2
echo temp0 > _darcs/prefs/author
echo m1 > foo
darcs add foo
darcs record -a -m m1 --ignore-times
cd ..

# step 2
darcs get temp0 temp1
cd temp1
echo temp1 > _darcs/prefs/author
echo a1 > foo
darcs record foo -a -m a1 --ignore-times
cd ..


# step 3
cd temp0
echo m2 > foo
darcs record -a -m m2 --ignore-times
cd ..


# step 4
cd temp1
darcs pull -a
echo m2-a1 > foo
darcs record -a -m 'Fix conflict m2-a1' --ignore-times
echo a2 > foo
darcs record -a -m a2 --ignore-times
cd ..

#step 5
cd temp0
echo m3 > foo
darcs record -a -m m3 --ignore-times
cd ..

#step 6
darcs get temp0 temp2
cd temp2
echo temp2 > _darcs/prefs/author
echo b1 > foo
darcs record -a -m b1 --ignore-times

cd ..

#step 7
cd temp0
echo m4 > foo
darcs record -a -m m4 --ignore-times
cd ..

#step 8
cd temp1
darcs pull -a
echo m2-a1-m4 > foo
darcs record -a -m 'Fix three-way m2/m2-a1/m4' --ignore-times
echo a3 > foo
darcs record -a -m a3 --ignore-times
cd ..

#step 9
cd temp1
darcs pull -av ../temp2
cd ..

rm -rf temp0 temp1 temp2