chiark / gitweb /
25b2ee0a22f20fe23ce6865c0eee3381bc5ca050
[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-expect-fail E:'general two-parent merge' \
52 t-git-debrebase
53
54 export GIT_DEBREBASE_EXPERIMENTAL_MERGE=1
55
56 t-git-debrebase
57 t-git-debrebase scrap
58
59 t-some-changes after
60 t-git-debrebase
61
62 # xxx want to check that we DTRT if we start out unstitched -
63 # xxx should consider our ffq-prev as a parent
64 # xxx or should we ?  it's not a parent of the merge is it ?
65 # xxx => user should prefer to make merges when stitched ?
66 # xxx think about this later
67
68 # t-gdr-good laundered
69 # xxx ^ this does not work
70
71 t-ok