Follow upstream changes -- rest
[git-darcs-import.git] / tests / issue588.sh
blobf75d3db9716796ae01277d3af8906b78ae7222e2
1 #!/usr/bin/env bash
3 # For issue588, "amend-record --look-for-adds end up with two "addfile" entries"
5 set -ev
7 rm -rf temp1
8 darcs init --repodir temp1
10 # Setup f with contents foo.
11 echo foo > temp1/f
12 darcs add --repodir temp1 f
13 darcs rec --repodir temp1 -am p1
15 # Remove f, and amend p1, but only the hunk not the rmfile.
16 # Here we use look-for-adds to trigger the bug
17 rm temp1/f
18 echo yyd | darcs amend-record --repodir temp1 --look-for-adds
20 darcs changes --repodir temp1 --last 1 -v
22 echo show the buggy pending
23 cat temp1/_darcs/patches/pending
25 echo bar > temp1/f
26 echo y | darcs amend-record --repodir temp1 --all
28 darcs changes --repodir temp1 --last 1 -v
30 darcs check --repodir temp1 --no-test
32 rm -rf temp1