chiark / gitweb /
git-debrebase: test suite: New gdr-merge test
[dgit.git] / tests / tests / gdr-merge
1 #!/bin/bash
2 set -e
3 autoimport=
4 . tests/lib
5
6 t-dependencies NO-DGIT GDR
7
8 t-tstunt-parsechangelog
9 t-setup-import gdr-convert-gbp-noarchive
10
11 : 'set up so t-git-debrebase runs gdr via git'
12
13 case "$DGIT_GITDEBREBASE_TEST" in
14 ''|git-debrebase)       ;;
15 *)
16         t-tstunt
17         st=$tmp/tstunt/git-debrebase
18         export DGIT_GITDEBREBASE_TEST_REAL="$DGIT_GITDEBREBASE_TEST"
19         cat <<'END' >$st
20 #!/bin/sh
21 set -x
22 exec "$DGIT_GITDEBREBASE_TEST_REAL" "$@"
23 END
24         chmod +x $st
25         ;;
26 esac
27
28 DGIT_GITDEBREBASE_TEST='git debrebase'
29
30 : 'do a simple test'
31
32 cd $p
33
34 t-gdr-prep-new-upstream 2.1
35 git tag v2.1 upstream
36
37 t-some-changes before
38 t-git-debrebase quick
39
40 git checkout -b other
41 t-some-changes other '' -other
42
43 git checkout master
44 t-some-changes us-1 '' -us
45 t-git-debrebase new-upstream 2.1
46 t-some-changes us-2 '' -us
47 t-git-debrebase quick
48
49 git merge other
50
51 t-some-changes after
52 # xxx ^ commenting out this line produces an internal error
53
54 t-expect-fail E:'general two-parent merge' \
55 t-git-debrebase
56
57 export GIT_DEBREBASE_EXPERIMENTAL_MERGE=1
58
59 t-git-debrebase
60
61 # xxx want to check that we DTRT if we start out unstitched -
62 # xxx should consider our ffq-prev as a parent
63 # xxx or should we ?  it's not a parent of the merge is it ?
64 # xxx => user should prefer to make merges when stitched ?
65 # xxx think about this later
66
67 # t-gdr-good laundered
68 # xxx ^ this does not work
69
70 t-ok