Dima Kogan writes ("Bug#1124338: dgit: dgit is confused by merged branch with 
debian/"):
> Hi. Thanks for replying. I did read the docs, and the "maint-merge"
> workflow is what I'm pretty sure I want.

dgit-maint-merge(7) works with a patches-applied branch.
Your existing "gbp" branch is presumably patches-unapplied.

You need to convert it.  The easiest way is probably to use `gbp pq`
to make what it calls a "patch queue" branch with, err I think `gbp pq
import`.  Then, switch back to the main branch, and git merge the
patch queue branch.  Delete the patch queue branch and delete the
patches in d/patches.  You'll need to change the source formt to 1.0
native, too.

But, I wonder if this is the right workflow for this pakage.
dgit-maint-merge is good if there are usually no patches, or only a
very small delta.  If there were no patches then your tree would
*already* be patches-applied since they'd be equivalent.

> There's so much complexity here that it's hard to know if I'm doing
> something wrong or I'm hitting a bug. I just looked into it again just
> now, and I'm pretty sure that this is either a bug or a case that dgit
> doesn't handle well (yet?).

dgit by default expects your branch to be patches-applied, but with
possible local changes to upstream files added on top in commits.
It is trying to find those commits so that it can turn them into
patches in d/patches.

Your existing branch would work with --quilt=gbp, probably.
The default, --quilt=linear, is simply wrong in this case.

> It looks like dgit looks through all of the git history, and if it sees
> any commits that it doesn't know about that touch debian/patches, it
> gives up. Right? Here I tried to manage this by removing all the
> debian/patches commits from my debian branch before merging it. However,
> as I was just reminded, many years ago the upstream git tree had the
> debianization in it. This was removed years ago, when mrcal was uploaded
> to Debian, but it's still in the history and dgit still sees it and
> barfs. Since this is in the upstream tree, I cannot just remove those
> commits. dgit should probably not react to the debian/patches commits
> prior to those files being deleted.

Don't try to "remove commits".  You don't want to be running the
commit linearisation algorithm at all.  It's wrong in your situation.

Ian.

-- 
Ian Jackson <[email protected]>   These opinions are my own.  

Pronouns: they/he.  If I emailed you from @fyvzl.net or @evade.org.uk,
that is a private address which bypasses my fierce spamfilter.

Reply via email to