From 7cfe71d6d45399ded9b50209a2c0dcbf132afd3d Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Tue, 4 Apr 2017 07:12:38 +0200 Subject: import_orig: move merge function closer next to each other Gbp-Dch: Ignore --- gbp/scripts/import_orig.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'gbp/scripts/import_orig.py') diff --git a/gbp/scripts/import_orig.py b/gbp/scripts/import_orig.py index 5df4d7b0..61ad7a26 100644 --- a/gbp/scripts/import_orig.py +++ b/gbp/scripts/import_orig.py @@ -364,6 +364,17 @@ def debian_branch_merge_by_replace(repo, tag, version, options): repo.force_head(commit, hard=True) +def debian_branch_merge_by_merge(repo, tag, version, options): + gbp.log.info("Merging to '%s'" % options.debian_branch) + branch = repo.get_branch() + repo.set_branch(options.debian_branch) + try: + repo.merge(tag) + except GitRepositoryError: + raise GbpError("Automatic merge failed.") + repo.set_branch(branch) + + def get_component_tarballs(name, version, tarball, components): """ Figure out the paths to the component tarballs based on the main @@ -383,17 +394,6 @@ def get_component_tarballs(name, version, tarball, components): return tarballs -def debian_branch_merge_by_merge(repo, tag, version, options): - gbp.log.info("Merging to '%s'" % options.debian_branch) - branch = repo.get_branch() - repo.set_branch(options.debian_branch) - try: - repo.merge(tag) - except GitRepositoryError: - raise GbpError("Automatic merge failed.") - repo.set_branch(branch) - - def set_bare_repo_options(options): """Modify options for import into a bare repository""" if options.pristine_tar or options.merge: -- cgit v1.2.3