t-tstunt-parsechangelog
t-setup-import gdr-convert-gbp-noarchive
-: 'do a simple test'
+export GIT_DEBREBASE_EXPERIMENTAL_MERGE=1
+
+: ----- prepare the baseline -----
cd $p
t-some-changes before
t-git-debrebase quick
+: ===== early failure in walk =====
+
+: ----- prepare other -----
+
git checkout -b other
t-some-changes other '' -other
+git branch other-before-new-upstream
+
+t-git-debrebase new-upstream 2.1
+t-git-next-date
+
+: ----- prepare master -----
+
+git checkout master
+t-git-debrebase new-upstream 2.1
+t-git-next-date
+
+git branch master-before-merge
+
+: ----- make the merge -----
+
+git merge -s ours other
+
+# we have to do a little dance to make this not a pseudomerge
+t-git-next-date
+dch -a 'Merge, only conflict was in debian/changelog'
+t-dch-r-rune dch
+git commit -a --amend --no-edit
+
+t-expect-fail F:'divergent anchors' \
+t-git-debrebase
+
+: ===== late failure in apply =====
+
git checkout other
+git reset --hard other-before-new-upstream
+
echo other-upstream-confict >>docs/README
git commit -m 'other-upstream-conflict' docs/README
t-git-debrebase quick
+: ----- make the merge -----
+
git checkout master
-t-git-debrebase new-upstream 2.1
+git reset --hard master-before-merge
t-merge-conflicted-stripping-conflict-markers other docs/README
-export GIT_DEBREBASE_EXPERIMENTAL_MERGE=1
+: ----- expect failure -----
t-expect-fail F:'docs/README' \
t-git-debrebase
-# xxx want to test a nomerge from first walk analysis half
# xxx want to check wrecknotes appear
t-ok