orig_group.add_config_file_option(option_name="compression-level", dest="comp_level",
help="Compression level, default is '%(compression-level)s'")
branch_group.add_config_file_option(option_name="upstream-branch", dest="upstream_branch")
- branch_group.add_config_file_option(option_name="debian-branch", dest="debian_branch")
+ branch_group.add_config_file_option(option_name="debian-branch", dest="packaging_branch")
branch_group.add_boolean_config_file_option(option_name = "ignore-branch", dest="ignore_branch")
branch_group.add_boolean_config_file_option(option_name = "submodules", dest="with_submodules")
cmd_group.add_config_file_option(option_name="builder", dest="builder",
raise
if not options.ignore_new and not options.ignore_branch:
- if branch != options.debian_branch:
- gbp.log.err("You are not on branch '%s' but on '%s'" % (options.debian_branch, branch))
+ if branch != options.packaging_branch:
+ gbp.log.err("You are not on branch '%s' but on '%s'" % (options.packaging_branch, branch))
raise GbpError("Use --git-ignore-branch to ignore or --git-debian-branch to set the branch name.")
head = repo.head
branch_group.add_option("--all", action="store_true", dest="all", default=False,
help="track all branches, not only debian and upstream")
branch_group.add_config_file_option(option_name="upstream-branch", dest="upstream_branch")
- branch_group.add_config_file_option(option_name="debian-branch", dest="debian_branch")
+ branch_group.add_config_file_option(option_name="debian-branch", dest="packaging_branch")
branch_group.add_boolean_config_file_option(option_name="pristine-tar", dest="pristine_tar")
branch_group.add_option("--depth", action="store", dest="depth", default=0,
help="git history depth (for creating shallow clones)")
local != "HEAD":
repo.create_branch(local, remote)
else: # only track gbp's default branches
- branches = [ options.debian_branch, options.upstream_branch ]
+ branches = [ options.packaging_branch, options.upstream_branch ]
if options.pristine_tar:
branches += [ repo.pristine_tar_branch ]
gbp.log.debug('Will track branches: %s' % branches)
not repo.has_branch(branch):
repo.create_branch(branch, remote)
- repo.set_branch(options.debian_branch)
+ repo.set_branch(options.packaging_branch)
except GitRepositoryError as err:
gbp.log.err("Git command failed: %s" % err)
branch_group.add_config_file_option(option_name="upstream-branch",
dest="upstream_branch")
branch_group.add_config_file_option(option_name="debian-branch",
- dest="debian_branch")
+ dest="packaging_branch")
branch_group.add_boolean_config_file_option(option_name="pristine-tar",
dest="pristine_tar")
branch_group.add_boolean_config_file_option(option_name="track",
try:
branches = []
- for branch in [ options.debian_branch, options.upstream_branch ]:
+ for branch in [ options.packaging_branch, options.upstream_branch ]:
if repo.has_branch(branch):
branches += [ branch ]
parser.add_option_group(custom_group)
parser.add_boolean_config_file_option(option_name = "ignore-branch", dest="ignore_branch")
- naming_group.add_config_file_option(option_name="debian-branch", dest="debian_branch")
+ naming_group.add_config_file_option(option_name="debian-branch", dest="packaging_branch")
naming_group.add_config_file_option(option_name="upstream-tag", dest="upstream_tag")
naming_group.add_config_file_option(option_name="debian-tag", dest="debian_tag")
naming_group.add_config_file_option(option_name="snapshot-number", dest="snapshot_number",
if not options.ignore_branch:
raise
- if options.debian_branch != branch and not options.ignore_branch:
- gbp.log.err("You are not on branch '%s' but on '%s'" % (options.debian_branch, branch))
- raise GbpError("Use --ignore-branch to ignore or --debian-branch to set the branch name.")
+ if options.packaging_branch != branch and not options.ignore_branch:
+ gbp.log.err("You are not on branch '%s' but on '%s'" %
+ (options.packaging_branch, branch))
+ raise GbpError("Use --ignore-branch to ignore or --debian-branch "
+ "to set the branch name.")
source = DebianSource('.')
cp = source.changelog
os.chdir(repo.path)
parents = check_parents(repo,
- options.debian_branch,
+ options.packaging_branch,
tag)
author = get_author_from_changelog(unpack_dir)
committer = get_committer_from_author(author, options)
commit = repo.commit_dir(unpack_dir,
"Imported Debian patch %s" % src.version,
- branch = options.debian_branch,
+ branch = options.packaging_branch,
other_parents = parents,
author=author,
committer=committer)
parser.add_option("--download", action="store_true", dest="download", default=False,
help="download source package")
branch_group.add_config_file_option(option_name="debian-branch",
- dest="debian_branch")
+ dest="packaging_branch")
branch_group.add_config_file_option(option_name="upstream-branch",
dest="upstream_branch")
branch_group.add_boolean_config_file_option(option_name="create-missing-branches",
branch = None
else:
branch = [options.upstream_branch,
- options.debian_branch][src.native]
+ options.packaging_branch][src.native]
if not repo.has_branch(branch):
if options.create_missing_branches:
gbp.log.info("Creating missing branch '%s'" % branch)
repo.create_branch(options.upstream_branch, commit)
if options.pristine_tar:
repo.pristine_tar.commit(src.tgz, options.upstream_branch)
- if (not repo.has_branch(options.debian_branch)
+ if (not repo.has_branch(options.packaging_branch)
and (is_empty or options.create_missing_branches)):
- repo.create_branch(options.debian_branch, commit)
+ repo.create_branch(options.packaging_branch, commit)
if not src.native:
if src.diff or src.deb_tgz:
apply_debian_patch(repo, upstream.unpacked, src, options,
tag)
else:
gbp.log.warn("Didn't find a diff to apply.")
- if repo.get_branch() == options.debian_branch or is_empty:
+ if repo.get_branch() == options.packaging_branch or is_empty:
# Update HEAD if we modified the checked out branch
- repo.force_head(options.debian_branch, hard=True)
+ repo.force_head(options.packaging_branch, hard=True)
except KeyboardInterrupt:
ret = 1
gbp.log.err("Interrupted. Aborting.")
# Check the changelog file from the repository, in case
# we're not on the debian-branch (but upstream, for
# example).
- cp = parse_changelog_repo(repo, options.debian_branch, 'debian/changelog')
+ cp = parse_changelog_repo(repo, options.packaging_branch, 'debian/changelog')
sourcepackage = cp['Source']
except NoChangeLogError:
if options.interactive:
branch_group.add_option("-u", "--upstream-version", dest="version",
help="Upstream Version")
branch_group.add_config_file_option(option_name="debian-branch",
- dest="debian_branch")
+ dest="packaging_branch")
branch_group.add_config_file_option(option_name="upstream-branch",
dest="upstream_branch")
branch_group.add_option("--upstream-vcs-tag", dest="vcs_tag",
repo.create_branch(options.upstream_branch, rev=commit)
repo.force_head(options.upstream_branch, hard=True)
elif options.merge:
- gbp.log.info("Merging to '%s'" % options.debian_branch)
- repo.set_branch(options.debian_branch)
+ gbp.log.info("Merging to '%s'" % options.packaging_branch)
+ repo.set_branch(options.packaging_branch)
try:
repo.merge(tag)
except GitRepositoryError:
if cp.has_epoch():
epoch = '%s:' % cp.epoch
info = { 'version': "%s%s-1" % (epoch, version) }
- env = { 'GBP_BRANCH': options.debian_branch }
+ env = { 'GBP_BRANCH': options.packaging_branch }
gbpc.Command(format_str(options.postimport, info), extra_env=env, shell=True)()
# Update working copy and index if we've possibly updated the
# checked out branch
branch_group.add_option("--redo-pq", action="store_true", dest="redo_pq", default=False,
help="redo the patch queue branch after a pull. Warning: this drops the old patch-queue branch")
branch_group.add_config_file_option(option_name="upstream-branch", dest="upstream_branch")
- branch_group.add_config_file_option(option_name="debian-branch", dest="debian_branch")
+ branch_group.add_config_file_option(option_name="debian-branch", dest="packaging_branch")
branch_group.add_boolean_config_file_option(option_name="pristine-tar", dest="pristine_tar")
branch_group.add_option("--depth", action="store", dest="depth", default=0,
help="git history depth (for deepening shallow clones)")
else:
raise
- for branch in [ options.debian_branch, options.upstream_branch ]:
+ for branch in [ options.packaging_branch, options.upstream_branch ]:
if repo.has_branch(branch):
branches.add(branch)
retval = 2
if options.redo_pq:
- repo.set_branch(options.debian_branch)
+ repo.set_branch(options.packaging_branch)
Command("gbp-pq")(["drop"])
Command("gbp-pq")(["import"])