On Monday, 2 March 2020 8:58:05 PM AEDT wferi@niif.hu wrote:
> Yeah. Please let me share my gbp-revert-import-orig script:
>
> #!/bin/sh -ex
>
> git checkout debian/master
> git tag debian/master.bak
> git tag -d $(git tag --points-at upstream/latest)
> git reset --hard $(git rev-list --topo-order --ancestry-path --reverse
> --merges upstream/latest..debian/master | head -n1)^ git branch -f
> upstream/latest upstream/latest^
> git branch -f pristine-tar pristine-tar^
>
> It works against full DEP-14 repositories, with the main packaging
> branch called debian/master and the main upstream branch called
> upstream/latest. I generally like working with such packaging
> repositories, and whenever I recognize that my latest import was wrong,
> I run this script, redo the import correctly, then cherry pick the
> post-import packaging changes from the ancestry of debian/master.bak.
> Once the diff of debian/master and debian/master.bak is what I want, I
> delete the debian/master.bak tag. This pretty much eliminated my big
> gripe with gbp import-orig. I don't think it solves everybody's every
> problem, though. :)
Thanks. This is an example of ridiculous complexity that makes it so hard for
new contributors. IMHO we should do our best to eliminate the need to do any
of those...
--
Regards,
Dmitry Smirnov.
---
Under observation, we act less free, which means we effectively are less
free.
-- Edward Snowden
Attachment:
signature.asc
Description: This is a digitally signed message part.