aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2023-05-31 10:36:52 +0200
committerGuido Günther <agx@sigxcpu.org>2023-05-31 10:36:52 +0200
commit4f909d243950715e305b5dde8d28fa401a121858 (patch)
tree8a618e157f726b6d971db78ec93dbc6bff768bb3
parente358254afdd4b3426adf320447c4744aea0a0969 (diff)
pq: Roll back on all errors
Drop the pq branch on all exceptions not only on the ones gbp throws itself. This makes sure the result is consistent in such situations (no patches applied).
-rwxr-xr-xgbp/scripts/pq.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gbp/scripts/pq.py b/gbp/scripts/pq.py
index f4b699e5..de9b0e31 100755
--- a/gbp/scripts/pq.py
+++ b/gbp/scripts/pq.py
@@ -333,7 +333,7 @@ def import_quilt_patches(repo, branch, series, tries, force, pq_from,
try:
name = os.path.basename(patch.path)
apply_and_commit_patch(repo, patch, maintainer, patch.topic, name)
- except (GbpError, GitRepositoryError) as e:
+ except Exception as e:
gbp.log.err("Failed to apply '%s': %s" % (patch.path, e))
repo.force_head('HEAD', hard=True)
repo.set_branch(branch)