6 t-dependencies NO-DGIT GDR
8 t-tstunt-parsechangelog
9 t-setup-import gdr-convert-gbp-noarchive
15 t-gdr-prep-new-upstream 2.1
24 t-expect-fail F:'Could not determine appropriate upstream commitish' \
25 t-git-debrebase new-upstream $v
29 git branch before-new-upstream
33 date=$(git log --format=%aD -n1 debian/changelog)
34 date=$(date -R -d "$date")
35 git show $before:debian/changelog >../clog.before
36 m=" * Update to new upstream version ${v%-*}."
37 e="dgit test git user <dgit-test@debian.example.net> $date"
40 diff -u ../clog.expected debian/changelog
43 : ----- ordinary new upstream test -----
45 t-git-debrebase new-upstream ${v%-*}
47 clog-check-1 before-new-upstream
48 cat - <<END ../clog.before >../clog.expected
49 example ($v) UNRELEASED; urgency=medium
59 git reflog | egrep 'debrebase new-upstream.*checkout'
61 t-git-debrebase stitch
66 : ----- 'with --anchor' -----
68 git checkout -b with-anchor startpoint
70 t-git-debrebase analyse >../anal.anch
71 anchor=$(perl <../anal.anch -ne '
72 next unless m/^(\w+) Anchor\s/;
77 GIT_REFLOG_ACTION='STUNT-RLA' \
78 t-git-debrebase --anchor=$anchor -fanchor-treated new-upstream $v upstream
80 git reflog | egrep 'STUNT-RLA: debrebase new-upstream'
81 git reflog | egrep 'STUNT-RLA: debrebase: launder for new upstream'
83 t-git-debrebase stitch
86 git diff --quiet ordinary
88 : ----- with pre-existing changes -----
90 git checkout -b with-preexisting before-new-upstream
92 t-dch-commit drivel-in-changelog
93 git branch before-new-upstream-with-changes
97 t-git-debrebase new-upstream ${v%-*}
99 clog-check-1 before-new-upstream-with-changes
100 perl -pe <../clog.before >../clog.expected '
101 BEGIN { ($m,$e,@ARGV) = @ARGV; }
102 next unless 1..m/^ --/;
103 s/\([^()]+\)/('$v')/ if m/^example /;
104 $_ .= "$m\n" if m/^ \* drivel-in-changelog/;
105 $_ = " -- $e\n" if m/^ -- /;