Follow upstream changes -- rest
[git-darcs-import.git] / tests / push-dry-run.sh
bloba369e0c8d113e13f08f66d6c6653e248e711df2e
1 #!/usr/bin/env bash
2 set -ev
4 # For issue855: wish: avoid taking lock if using --dry-run
5 chmod -R u+w temp2 || :
6 rm -rf temp1 temp2
7 mkdir temp1
8 cd temp1
9 darcs init
10 cd ..
11 mkdir temp2
12 cd temp2
13 darcs init
14 touch x
15 darcs add x
16 darcs record -am "test"
17 cd ..
18 chmod -R u-w temp2
19 cd temp2
20 # need to capture this failure so that we can still
21 # chmod -R u+w the directory even if we fail
22 darcsexit=0
23 darcs push --dry-run ../temp1 || darcsexit=$?
24 cd ..
25 chmod -R u+w temp2 # so that other scripts can cleanup
26 if [ $darcsexit -ne 0 ]; then
27 exit $darcsexit