Follow upstream changes -- rest
[git-darcs-import.git] / tests / merging_newlines.sh
blob39e7d3c4679af84fc25904457d73108c81e5cbfd
1 #!/usr/bin/env bash
2 set -ev
4 # trick: requiring something to fail
5 not () { "$@" && exit 1 || :; }
7 # A test for darcs resolve detecting a conflict, inspired by bug #152 in RT
9 rm -rf temp1 temp2
11 # set up the repository
12 mkdir temp1
13 cd temp1
14 darcs init
15 cd ..
17 cd temp1
18 echo "apply allow-conflicts" > _darcs/prefs/defaults
19 # note: to make this pass, change echo to echo -n
20 # is that right?
21 echo "from temp1" > one.txt
22 darcs add one.txt
23 darcs record -A bar -am "add one.txt"
24 echo >> one.txt
25 darcs wh -u
26 cd ..
28 darcs get temp1 temp2
29 cd temp2
30 # reality check
31 darcs show files | grep one.txt
32 echo "in tmp2" >> one.txt
33 darcs whatsnew -s | grep M
34 darcs record -A bar -am "add extra line"
35 darcs annotate -p . -u
36 darcs push -av > log
37 cat log
38 not grep -i conflicts log
39 cd ..
41 rm -rf temp1 temp2