Follow upstream changes -- rest
[git-darcs-import.git] / tests / repair.sh
blob6e089935eb9b25d4b5d5599b84dd5b1618956a43
1 #!/usr/bin/env bash
2 set -ev
4 rm -rf temp1
5 mkdir temp1
6 cd temp1
7 darcs initialize
8 echo ALL ignore-times >> _darcs/prefs/defaults
9 echo A1 > foo
10 mkdir d
11 echo A2 > d/bar
12 darcs add foo
13 darcs add d
14 darcs add d/bar
15 darcs record -a -m AA -A x
16 echo B > foo
17 darcs record -a -m BB -A x
18 echo C > foo
19 darcs record -a -m CC -A x
21 for i in _darcs/pristine*; do
22 echo Empty the pristine directory: $i
23 rm -rf $i
24 mkdir $i
25 done
27 darcs repair
29 cd ..
30 rm -rf temp1