File: posthook.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 (41 lines) | stat: -rw-r--r-- 824 bytes parent folder | download
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
#!/usr/bin/env bash

. ./lib

rm -rf temp1
mkdir temp1
cd temp1
darcs init
touch foo
darcs add foo

# Check that posthook works...
darcs whatsnew -s --posthook 'touch posthook-ran'
test -f posthook-ran
rm posthook-ran

# Check that posthook works with defaults...
echo ALL --posthook touch posthook-ran > _darcs/prefs/defaults
darcs whatsnew -s
test -f posthook-ran
rm posthook-ran

cd ..
rm -rf temp1

# Check that DARCS_PATCHES_XML works
rm -rf R S                      # another script may have left a mess
darcs init      --repo R        # Create our test repos.
darcs init      --repo S        # Create our test repos.

cd R
cat > _darcs/prefs/defaults << END
apply posthook printenv DARCS_PATCHES_XML
END
cd ..

cd S
echo 'Example content.' > f
darcs record -lam 'Add f'
darcs push -a ../R | grep 'patch author'
cd ..