#881467 git-buildpackage: gbp dch should filter out commits behind upstream-vcs-tag

#881467#5
Date:
2017-11-12 06:15:26 UTC
From:
To:
I use upstream-vcs-tag to include upstream's commits in addition to
the debian packaging commits in debian packaging git history.

This works great for many parts of my workflow, thanks!

However, it causes "gbp dch" to propose incredibly verbose changelogs
when i import new versions from upstream -- the proposed changelog
entry includes all of upstream's commits as well as the debian
packaging.

But, "gbp dch" should be able to tell that upstream-vcs-tag is
available (e.g. debian/gbp.conf) and it could exclude upstream's
changes (maybe replacing them all with "New upstream release") when
generating a new debian/changelog entry.

Does that make sense as a feature request?

#881467#10
Date:
2017-11-12 09:43:43 UTC
From:
To:
Hi,

Gbp-Dch can ge told which files/directories to look at for changes like

    gbp dch debian/

so while something you describe could be added too I'm not sure it's
really useful.

That said if somebody comes up with a clean patch I'm happy to apply
it. Given all the other bugs we have currently open in gbp it's not
likely I'm going to implement this anytime soon.

Cheers,
 -- Guido

#881467#15
Date:
2024-12-01 21:49:12 UTC
From:
To:
The changelog is easy to update to only include Debian changes with:

    gbp dch -- debian

Maybe gbp dch could have this automatically if debian/source/format
`3.0 (quilt)`?

For context, I have this workflow for all my packages:

    git fetch --verbose upstreamvcs
    # Note latest tag, e.g. r3.2, and verify it
    git verify-tag r3.2
    # Import latest debian/patches so that it is easy to rebase later
    gbp pq drop && gbp pq import && gbp pq switch
    # Download upstream release tarball, and merge using both git tag
and tarball
    gbp import-orig --uscan
    gbp dch --distribution=UNRELEASED \
      --commit --commit-msg="Update changelog and refresh patches
after %(version)s import" \
      -- debian
    gbp pq rebase
    gbp pq export --drop --commit
    git commit --all --amend # or `git citool --amend`
    # Note: remember to manually strip '1:' and '-1' from commit
message title as
    # the '%(version)s' output is the Debian version and not upstream version!

#881467#20
Date:
2024-12-01 22:49:57 UTC
From:
To:
Hi,

That's not needed as gbp-dch looks at the packaging branch so commits
from upstream vcs aren't included.

Cheers,
 -- Guido

#881467#25
Date:
2024-12-01 23:01:38 UTC
From:
To:
Yes it is needed when gbp import-orig --uscan runs with
gbp.conf:upstream-vcs-tag configured and the upstream commits are in
the shared history. I would not be using this consistently if I could
do without..

#881467#30
Date:
2024-12-02 07:13:15 UTC
From:
To:
Hi,

Ah, right, I was wondering why this isn't the case over here but turns
out my scripts are running "gbp dch -R -- debian/" since years.

Or rather make it the default and only include the full history with a
`--full` option (We can then still support filtering via `--`).

Cheers,
 -- Guido

#881467#35
Date:
2024-12-03 07:24:41 UTC
From:
To:
Hi!

Sure, that works too for non-native packages when debian/source/format
has `3.0 (quilt)`.

For all other (native or legacy) packages I assume people want to put
everything in the changelog (or start with everything there, and then
remove excess lines).