summaryrefslogtreecommitdiff
path: root/gbp
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2012-01-12 15:35:20 +0200
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-06-05 14:20:04 +0300
commit127fa79a4189828e528fbbe0b5ac9892cf259c4c (patch)
tree9f56cfc15ccf2af05a82a479849d2bd486668587 /gbp
parent4c5e0a2ccca453968e7c83b7a3ceca4441241885 (diff)
downloadgit-buildpackage-127fa79a4189828e528fbbe0b5ac9892cf259c4c.tar.gz
git-buildpackage-127fa79a4189828e528fbbe0b5ac9892cf259c4c.tar.bz2
git-buildpackage-127fa79a4189828e528fbbe0b5ac9892cf259c4c.zip
Rename internal var debian_branch -> packaging_branch
This is done in sake of more general purpose naming, intended for enabling rpm support. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp')
-rwxr-xr-xgbp/scripts/buildpackage.py6
-rwxr-xr-xgbp/scripts/clone.py6
-rwxr-xr-x[-rw-r--r--]gbp/scripts/create_remote_repo.py4
-rwxr-xr-x[-rw-r--r--]gbp/scripts/dch.py10
-rwxr-xr-x[-rw-r--r--]gbp/scripts/import_dsc.py16
-rw-r--r--gbp/scripts/import_orig.py10
-rwxr-xr-xgbp/scripts/pull.py6
7 files changed, 30 insertions, 28 deletions
diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py
index 83181dcc..9ef37949 100755
--- a/gbp/scripts/buildpackage.py
+++ b/gbp/scripts/buildpackage.py
@@ -431,7 +431,7 @@ def build_parser(name, prefix=None):
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",
@@ -545,8 +545,8 @@ def main(argv):
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.")
tree = write_tree(repo, options)
diff --git a/gbp/scripts/clone.py b/gbp/scripts/clone.py
index 62d0dcc2..209af13b 100755
--- a/gbp/scripts/clone.py
+++ b/gbp/scripts/clone.py
@@ -43,7 +43,7 @@ def build_parser(name):
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)")
@@ -105,7 +105,7 @@ def main(argv):
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)
@@ -115,7 +115,7 @@ def main(argv):
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)
diff --git a/gbp/scripts/create_remote_repo.py b/gbp/scripts/create_remote_repo.py
index f0e680b4..0d2345cd 100644..100755
--- a/gbp/scripts/create_remote_repo.py
+++ b/gbp/scripts/create_remote_repo.py
@@ -245,7 +245,7 @@ def build_parser(name, sections=[]):
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",
@@ -319,7 +319,7 @@ def main(argv):
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 ]
diff --git a/gbp/scripts/dch.py b/gbp/scripts/dch.py
index c0344805..b5882e62 100644..100755
--- a/gbp/scripts/dch.py
+++ b/gbp/scripts/dch.py
@@ -308,7 +308,7 @@ def build_parser(name):
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",
@@ -407,9 +407,11 @@ def main(argv):
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
diff --git a/gbp/scripts/import_dsc.py b/gbp/scripts/import_dsc.py
index ffb8a084..1c61dc4d 100644..100755
--- a/gbp/scripts/import_dsc.py
+++ b/gbp/scripts/import_dsc.py
@@ -148,14 +148,14 @@ def apply_debian_patch(repo, unpack_dir, src, options, tag):
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)
@@ -232,7 +232,7 @@ def build_parser(name):
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",
@@ -353,7 +353,7 @@ def main(argv):
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)
@@ -386,18 +386,18 @@ def main(argv):
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.")
diff --git a/gbp/scripts/import_orig.py b/gbp/scripts/import_orig.py
index 7cebd1c8..78bbf476 100644
--- a/gbp/scripts/import_orig.py
+++ b/gbp/scripts/import_orig.py
@@ -54,7 +54,7 @@ def detect_name_and_version(repo, source, options):
# 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:
@@ -164,7 +164,7 @@ def build_parser(name):
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",
@@ -314,8 +314,8 @@ def main(argv):
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:
@@ -330,7 +330,7 @@ def main(argv):
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(options.postimport % info, extra_env=env, shell=True)()
# Update working copy and index if we've possibly updated the
# checked out branch
diff --git a/gbp/scripts/pull.py b/gbp/scripts/pull.py
index b505e6d6..85328b4e 100755
--- a/gbp/scripts/pull.py
+++ b/gbp/scripts/pull.py
@@ -115,7 +115,7 @@ def build_parser(name):
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)")
@@ -162,7 +162,7 @@ def main(argv):
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)
@@ -195,7 +195,7 @@ def main(argv):
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"])