#908204 git-buildpackage: cannot use gbp push without tagging a release

#908204#5
Date:
2018-09-07 07:32:45 UTC
From:
To:
$ gbp push --verbose
gbp:debug: ['git', 'rev-parse', '--show-cdup']
gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
gbp:debug: ['git', 'rev-parse', '--git-dir']
gbp:debug: ['git', 'symbolic-ref', 'HEAD']
gbp:debug: ['git', 'show-ref', 'refs/heads/master']
gbp:debug: ['git', 'config', 'branch.master.remote']
gbp:debug: ['git', 'config', 'branch.master.merge']
gbp:debug: ['git', 'tag', '-l', 'debian/3.31.0+dfsg-1']
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'debian/3.31.0+dfsg-1^{commit}']
gbp:error: revision 'debian/3.31.0+dfsg-1^{commit}' not found
$

And ... so what?

I don't care whether I have already a debian release tag, I
want to push the stuff so that I can continue working on a different
computer.

Thanks

Norbert

#908204#10
Date:
2018-09-09 13:34:59 UTC
From:
To:
control: severity -1 wishlist

Hi,

See the man page.

Than you can use plain "git push". gbp push's aim is to push your
current release. It should push prisitne-tar and upstream branches if
not up to date. If this does not happen it's a bug but pushing non
uptodate debian packaging branch is not the focus.
Cheers,
 -- Guido

#908204#17
Date:
2018-09-09 13:45:35 UTC
From:
To:
Hi Guido,

Ok, was that always like this? I faintly remember (but without
screenshot to prove it) that I could gbp push stuff even without a
tagged debian release!?

? I don't get what you want to say? I want gbp push to push the branches
that are normally used by gbp (master/upstream/pristine-tar) and push
any tag from gbp tag that isn't up there.

Is this so unreasonable?

Maybe I am the only developer on this earth that uses two computers and
prefers to push/pull, but I was more than once beaten by a not pushed
pristine-tar branch...

Best

Norbert

#908204#22
Date:
2018-09-09 15:59:19 UTC
From:
To:
Hi,

It pushes everything *except* for the tip of your packaging branch (that
is any tags needed, upstream and pristine tar.

And it does that, see this test:

https://github.com/agx/git-buildpackage/blob/master/tests/component/deb/test_push.py#L106

Don't think so.
 -- Guido

#908204#27
Date:
2018-10-08 16:33:47 UTC
From:
To:
On Sun, 9 Sep 2018 17:59:19 +0200 Guido =?iso-8859-1?Q?G=FCnther?= < agx@sigxcpu.org> wrote:
https://github.com/agx/git-buildpackage/blob/master/tests/component/deb/test_push.py#L106
Hi,

I started using gbp push/pull recently and I'm also surprised by the current
behavior. What is the rationale for *not* pushing the Debian branch as part of
the push?

For me, gbp push semantics are: “just push everything needed”, but it's
obviously not the intended behavior. What is the intended behavior then?

Regards,

#908204#32
Date:
2018-12-08 13:35:32 UTC
From:
To:
Hi,

Yves-Alexis Perez <corsac@debian.org> writes:

+1.

For Go packaging, our tooling recommends users use “gbp push” to
transfer their local repository state to salsa. The fact that this now
only works after you tag a release trips people up:
https://github.com/Debian/dh-make-golang/issues/107

Any chance we could get the new behavior hidden behind a flag, or at
least get a flag to restore the old behavior?

Thank you,

#908204#37
Date:
2018-12-09 14:31:04 UTC
From:
To:
Hi Guido,

I'm trying to figure out the implication of your answer and solution
for this problem.

So let me summarize up the conclusion first,

gbp pushes up-to-date content of everything (that is any tags needed,
upstream and pristine tar) *except* for the tip of the packaging
branch, because "pushing non
uptodate debian packaging branch is not the focus"

Does that implies that people can gbp push stuff even without a tagged
debian release!?
that are normally used by gbp (master/upstream/pristine-tar) and push
any tag from gbp tag that isn't up there.

I took a look at the test:
https://github.com/agx/git-buildpackage/blob/master/tests/component/deb/test_push.py#L106

But can't figure out whether my implication-guess is right or not
because I don't understand those Python code. Any how,

If I want gbp to push _latest_ content of everything (including all the branches
that are normally used by gbp (master/upstream/pristine-tar) and any
tag from gbp tag that isn't up there), what shall I do?

If gbp somehow not able to do that currently, is there any workaround
to make it happen? E.g., if I have to tag a debian release, then how
exactly should I tag it so that it is acceptable by gbp?

Please help

Thanks

#908204#42
Date:
2020-12-17 08:22:22 UTC
From:
To:
Hi,

Would 'gbp push' getting a '--tips' option to just pushes the tips of
upstream, debian and pristine-tar branch help?
Cheers,
 -- Guido

#908204#47
Date:
2021-04-05 02:33:54 UTC
From:
To:
Took some time, but ..

I guess that is what I would normally use ... so yes, that would help.

Thanks

Norbert

#908204#52
Date:
2023-12-08 03:58:41 UTC
From:
To:
Hi,

I'm working with a lot of newcommers in the Debian Brasília community
and learning packaging (and a myriad of tools that come with it) is
quite overwhelming. So we try to streamline things to make packaging a
little easier. gbp is a awesome tool (thanks!) because it simplifies
working with git, but the problem comes with the combination of working
with forks+mr (remember, newcommers) and importing new upstream
releases. gpb push fails because there is no tag in the debian branch
(but we want an unreleased and untagged push to the fork so an MR can be
opened). The alternative is to teach them pushing with plain old git,
but they always forget to push the upstream/pristine-tar branches.

Also, I too work with multiple computers and with the fork+mr workflow
so being able to just gbp push would be wonderful. git push --all is not
ok because often I have a patch-queue branch that I don't want on salsa
and also upstream branches sometimes coexist.

Soooo, it would be really nice to at least have a flag --tips or --head
in gbp to do all the work for me.

Cheers,
Charles

#908204#57
Date:
2023-12-08 09:09:42 UTC
From:
To:
Hi Carlos,

I think

   gbp  push --debian-tag='' <remote>

does what you want. Note that this doesn't change anything for
pristine-tar / upstream) which is usually the desired effect.

Cheers,
 -- Guido

#908204#62
Date:
2023-12-13 14:29:45 UTC
From:
To:
Hi, Guido

It does indeed, awesome and thanks!

Maybe adding this to the manpage could benefit a lot of contributors
(and you could close this bug :-). Right now, I'm not sure I can
understand this behaviour from it:

#908204#67
Date:
2023-12-13 15:14:14 UTC
From:
To:
Hi Change,

Do you want to send a patch?
Cheers,
 -- Guido

#908204#72
Date:
2024-03-05 17:03:34 UTC
From:
To:
Hi!

Sorry, this got a bit lost in my todo list.

For the experience I had working with forks and importing new upstream
releases, it also sends them because there is a new upstream tag. The
problem is that it didn't send the debian branch but with
--debian-tags='' it does send everything.

Just a small note, this workflow with forks seems to be more usual these
day [1] so I shared this info [2].

I don't know the inner workings of git-buildpackage, so I was a bit
reluctant in writing the patch for the manpage, but here goes (attached
to the email) a try.

Altough it works well for my use case, I think having a --tips option
would be nice (wishilist here :-).

I can send a merge request in github if you prefer.

Cheers,
Charles

[1] https://lists.debian.org/debian-security-tools/2024/02/msg00000.html
[2] https://lists.debian.org/debian-security-tools/2024/03/msg00002.html

#908204#77
Date:
2024-03-05 18:11:56 UTC
From:
To:
Hi,

Applied. Thanks!
 -- Guido