File: output.sh

package info (click to toggle)
darcs 2.18.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,960 kB
  • sloc: haskell: 47,748; sh: 13,466; ansic: 447; perl: 134; makefile: 8
file content (67 lines) | stat: -rw-r--r-- 1,312 bytes parent folder | download | duplicates (5)
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
#!/usr/bin/env bash
. ./lib

rm -rf temp1 temp2 temp3
mkdir temp2
cd temp2
darcs init
cd ..

mkdir temp1
cd temp1
darcs init
touch foo bar
darcs add foo bar
darcs record -a -m foobar -A author
darcs send --no-minimize -a --dont-edit-description -o ../temp3 ../temp2
test -f ../temp3

darcs send --no-minimize -a --dont-edit-description -o ../temp2/patchfile ../temp2
test -f ../temp2/patchfile

mkdir subdir
darcs send --no-minimize -a --dont-edit-description -o subdir/../../temp2/patchfile1 ../temp2
test -f ../temp2/patchfile1

cp ../temp3 correct

cd subdir
darcs send --no-minimize -a --dont-edit-description -o ../patchfile ../../temp2
diff -u ../patchfile ../correct

rm ../patchfile
darcs send --no-minimize -a --set-default --dont-edit-description -o - ../../temp2 > ../patchfile
grep -v Creating ../patchfile | diff -u ../correct -

darcs apply --repodir=../../temp2 --dry-run ../patchfile > out
cat out
grep foobar out

cd ../..

cd temp2

darcs apply --dry-run ../temp3 > out
cat out
grep foobar out

darcs apply --dry-run ../temp1/correct > out
cat out
grep foobar out

darcs apply --dry-run ../temp1/patchfile > out
cat out
grep foobar out

darcs apply --dry-run ../temp3 > out
cat out
grep foobar out

darcs apply --dry-run ../temp3 > out
cat out
grep foobar out

cd ..

rm -rf temp1 temp2 temp3