push: Make --debian-tag='' match the documentation
authorGuido Günther <agx@sigxcpu.org>
Wed, 26 Jan 2022 07:57:12 +0000 (08:57 +0100)
committerGuido Günther <agx@sigxcpu.org>
Fri, 11 Feb 2022 13:21:14 +0000 (14:21 +0100)
commitcaf64cb15e794fc7e13974fab19ce932cf6f563c
treec4c992b65e5184211a1128e009247103572dfb23
parent63ce4ed556815d0ff9650f1b70b8b11c8e313111
push: Make --debian-tag='' match the documentation

An empty Debian tag indicates "don't care" about the packaging branch.
Don't fail in that case but rather push out up to the branch tip:

  Currently we'd fail like

  $ gbp push --debian-tag='' guido
  Traceback (most recent call last):
    File "/usr/bin/gbp", line 149, in <module>
      sys.exit(supercommand())
    File "/usr/bin/gbp", line 145, in supercommand
      return module.main(args)
    File "/usr/lib/python3/dist-packages/gbp/scripts/push.py", line 153, in main
      to_push['refs'].append((ref, get_push_src(repo, ref, dtag)))
  UnboundLocalError: local variable 'dtag' referenced before assignment

this make it simple to push the current development work via

  gbp  push --debian-tag='' <remote>
gbp/scripts/push.py