aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/scripts/import_orig.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-07-21 13:19:31 +0200
committerGuido Günther <agx@sigxcpu.org>2016-07-21 13:28:02 +0200
commit1f0013caa9dae2fb6e8a033589d039b86ee1abc3 (patch)
tree7717cf87a17149d6cab3adb771651d5dda076bf7 /gbp/scripts/import_orig.py
parent41887daa13ab053b6091f8609079981a192668df (diff)
import-orig: Switch to Debian branch before merging in changes
otherwise we'd always merge into the current working copy Closes: #832016
Diffstat (limited to 'gbp/scripts/import_orig.py')
-rw-r--r--gbp/scripts/import_orig.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gbp/scripts/import_orig.py b/gbp/scripts/import_orig.py
index 42be50c7..aead3ebc 100644
--- a/gbp/scripts/import_orig.py
+++ b/gbp/scripts/import_orig.py
@@ -346,11 +346,13 @@ def get_component_tarballs(name, version, tarball, components):
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("Merge failed, please resolve.")
- repo.set_branch(options.debian_branch)
+ repo.set_branch(branch)
def set_bare_repo_options(options):