pq-rpm: fix the mistake of generate_patches. sandbox/xuwc/gbp_0.9.29
authorwanchao-xu <wanchao.xu@samsung.com>
Tue, 30 Apr 2024 06:16:23 +0000 (14:16 +0800)
committerwanchao-xu <wanchao.xu@samsung.com>
Tue, 30 Apr 2024 06:16:23 +0000 (14:16 +0800)
Change-Id: Ieaa9f6e3c9a063a50c25d623e1fe76f0c1926815
Signed-off-by: wanchao-xu <wanchao.xu@samsung.com>
gbp/scripts/pq_rpm.py

index 95c60b66381f52f635a9105320c17935e36fdf9a..445540b3b3ce47dfa19b6c50db319b86a07f1064 100755 (executable)
@@ -89,11 +89,12 @@ def generate_patches(repo, start, squash, end, outdir, options):
     start_sha1 = repo.rev_parse("%s^0" % start)
     try:
         end_commit = end
+        end_commit_sha1 = repo.rev_parse("%s^0" % end_commit)
     except GitRepositoryError:
         # In case of plain tree-ish objects, assume current branch head is the
         # last commit
         end_commit = "HEAD"
-    end_commit_sha1 = repo.rev_parse("%s^0" % end_commit)
+        end_commit_sha1 = repo.rev_parse("%s^0" % end_commit)
 
     start_sha1 = repo.rev_parse("%s^0" % start)
 
@@ -157,8 +158,8 @@ def generate_patches(repo, start, squash, end, outdir, options):
     if end_commit != end:
         gbp.log.info("Generating diff file %s..%s" % (end_commit, end))
         patch_fn = format_diff(outdir, None, repo, end_commit, end,
-                               options.patch_export_ignore_path,
-                               abbrev=options.abbrev)
+                               abbrev=options.abbrev,
+                               path_exclude_regex=options.patch_export_ignore_path)
         if patch_fn:
             patches.append(patch_fn)