From: Ian Jackson Date: Sat, 11 Aug 2018 16:31:01 +0000 (+0100) Subject: git-debrebase: merge: gdr-merge test: Test an early failure too X-Git-Tag: archive/debian/6.7~98 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=0c08383390e6759b14a8a825c736abd5ec555e0a git-debrebase: merge: gdr-merge test: Test an early failure too And sort out the section comments. Signed-off-by: Ian Jackson --- diff --git a/tests/tests/gdr-merge-conflicts b/tests/tests/gdr-merge-conflicts index afdd014f..4517be4a 100755 --- a/tests/tests/gdr-merge-conflicts +++ b/tests/tests/gdr-merge-conflicts @@ -8,7 +8,9 @@ t-dependencies NO-DGIT GDR 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 @@ -18,26 +20,61 @@ git tag v2.1 upstream 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