Follow upstream changes -- rest
[git-darcs-import.git] / tests / repodir.sh
blobdfde85fb8351182ff49e252fd9a88f90edbf1beb
1 #!/usr/bin/env bash
2 ### http://bugs.darcs.net/issue496
3 ### _darcs/prefs/defaults ignored when using --repodir
4 set -ev
6 ## All these commands SHOULD fail (hence leading NOTs).
7 ## I would use the builtin !, but that has the wrong semantics.
8 not () { "$@" && exit 1 || :; }
10 rm -rf temp
11 mkdir temp
12 cd temp
14 mkdir repo
15 darcs initialize --repodir repo
16 cd repo
17 date > foo
18 darcs add foo
19 darcs record -a -m auth
21 echo > _darcs/prefs/defaults ALL disable # try to disable all
22 not darcs changes
23 not darcs changes --repodir "$PWD"
25 cd ..
27 not darcs changes --repodir repo
28 not darcs changes --repodir "$PWD/repo"
30 rm -rf temp