Hi, On Thu, Jun 11, 2020 at 10:22:14AM +0200, Raphael Hertzog wrote: > On Wed, 10 Jun 2020, Guido Günther wrote: > > Happy to apply a patch. I'm using > > > > ``` > > [import-orig] > > # Automatically forward the changelog after importing a new upstream version > > postimport = gbp dch -S -a --debian-branch=$GBP_BRANCH && git commit > > --amend -C@{0} debian/changelog > > ``` > > > > to basically get this. > > Note that "gbp dch -S -a" will not do what I'm asking here. My issue is > when we have a pre-existing UNRELEASED entry for the former upstream > version. That changelog entry is reused by "gbp dch" but the version > number is not changed to match the latest upstream release that was merged > before with gbp import-orig.
If you start using the hook it will do the right thing for new versions from there on but as said it's just a stop gap. > > More concretely, I have merged upstream release 4.0 but right > now my changelog has this: > cpputest (3.8-8) UNRELEASED; urgency=medium > > And after "gbp dch" it still has the same header line when it should have > updated it to 4.0-1 (or 4.0-1~1.gbp<sha> with -S). Looking at the code this happens since there's no section being added: https://git.sigxcpu.org/cgit/git-buildpackage/tree/gbp/scripts/dch.py#n524 and so we don't even start looking for a new version. It would be best to make `gbp-dch` always check for new merged in upstream tags and udpate the version accordingly (maybe hidden behind a config option for people using upstrem git or complex histories). Cheers, -- Guido > > Cheers, > -- > ⢀⣴⠾⠻⢶⣦⠀ Raphaël Hertzog <hert...@debian.org> > ⣾⠁⢠⠒⠀⣿⡁ > ⢿⡄⠘⠷⠚⠋ The Debian Handbook: https://debian-handbook.info/get/ > ⠈⠳⣄⠀⠀⠀⠀ Debian Long Term Support: https://deb.li/LTS >