File: annotate.sh

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

rm -rf temp1
darcs init temp1
cd temp1
mkdir a b
touch a/a b/b
darcs record -lam ab
darcs annotate a/a
echo x > c
darcs record -lam foo -A 'Mark Stosberg <a@b.com>'
darcs annotate c
darcs annotate c | grep "a@b.com"
cd ..

# issue1473 annotate repodir
rm -rf temp1
mkdir temp1
cd temp1
darcs init
mkdir a b
touch a/a b/b
darcs add --rec .
darcs record -a -m ab -A test
darcs annotate a/a
darcs annotate . > inner
# annotate --repodir=something '.' should work
cd ..
darcs annotate --repodir temp1 '.' > temp1/outer
cd temp1
diff inner outer

cd ..

# issue2207 : annotate on directories
rm -rf temp1
darcs init temp1
cd temp1
mkdir d
touch d/f
darcs record -lam 'p1'
darcs annotate d | grep 'p1'
cd ..

# issue1473 - check that annotate works with and without
# repodir and with "." argument.  It should fail with the empty string as
# a single argument and without any arguments.

rm -rf temp1
darcs init temp1
cd temp1
echo 'Example content.' > f
darcs record -lam 'Added f.'
darcs annotate .
darcs annotate f
not darcs annotate
not darcs annotate ''

cd ..
darcs annotate --repodir=temp1 .
darcs annotate --repodir=temp1 f
not darcs annotate --repodir=temp1
not darcs annotate --repodir=temp1 ''