Package: git-buildpackage Version: 0.5.19 Severity: normal create-missing-branches is not considered if debian-branch is different then the initial branch while creating the git repository. therefore it isn't possible to import two different debian package descriptions for the same sources with git-import-dsc.
-- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.26-2-xen-686 (SMP w/1 CPU core) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages git-buildpackage depends on: ii devscripts 2.10.71 scripts to make the life of a Debi ii git [git-core] 1:1.7.4.1-3 fast, scalable, distributed revisi ii python 2.6.6-3+squeeze6 interactive high-level object-orie ii python-dateutil 1.4.1-3 powerful extensions to the standar ii python-support 1.0.11 automated rebuilding support for P Versions of packages git-buildpackage recommends: ii cowbuilder 0.62+nmu2 pbuilder running on cowdancer ii pristine-tar 1.13 regenerate pristine tarballs Versions of packages git-buildpackage suggests: pn git-load-dirs <none> (no description available) pn python-notify <none> (no description available) -- no debconf information
>From 05eda812eca0c2ac891c1e3542fcf8b33885ceee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= <bjoern.ri...@intevation.de> Date: Tue, 5 Apr 2011 09:39:27 +0200 Subject: [PATCH] Create debian branch if a repo already exists Let a user decide to create a new debian branch (if it does not exist yet) by setting --create-missing-branches. This allows to import different debian package descriptions for the same sources into the same gbp maintained git repository. --- git-import-dsc | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/git-import-dsc b/git-import-dsc index a04344f..5062014 100755 --- a/git-import-dsc +++ b/git-import-dsc @@ -265,7 +265,8 @@ def main(argv): else: raise SkipImport - if not repo.find_version(format[0], src.upstream_version): + commit = repo.find_version(format[0], src.upstream_version) + if not commit: gbp.log.info("Tag %s not found, importing %s tarball" % (tag, format[1])) if is_empty: branch = None @@ -293,7 +294,8 @@ def main(argv): gbpc.PristineTar().commit(src.tgz, 'refs/heads/%s' % options.upstream_branch) parents = [ options.upstream_branch ] if not src.native: - if is_empty and not repo.has_branch(options.debian_branch): + if is_empty or (not repo.has_branch(options.debian_branch) and options.create_missing_branches): + gbp.log.info("Creating debian branch '%s'" % options.debian_branch) gbpc.GitBranch()(options.debian_branch, commit) if src.diff or src.deb_tgz: apply_debian_patch(repo, unpack_dir, src, options, parents) -- 1.7.4.1