diff options
author | Sam James <sam@gentoo.org> | 2024-06-02 04:54:21 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-06-02 04:55:29 +0100 |
commit | 6a841482abadd2713b8892fef68d32f8c6d10391 (patch) | |
tree | 059c173c7610cfa566346956d985647e334dd046 /dev-vcs | |
parent | dev-util/mingw64-toolchain: restore 12.0.0 keywords (diff) | |
download | gentoo-6a841482abadd2713b8892fef68d32f8c6d10391.tar.gz gentoo-6a841482abadd2713b8892fef68d32f8c6d10391.tar.bz2 gentoo-6a841482abadd2713b8892fef68d32f8c6d10391.zip |
dev-vcs/git-filter-repo: enable py3.12, fix tests w/ newer git
Closes: https://bugs.gentoo.org/835001
Closes: https://bugs.gentoo.org/929560
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-vcs')
-rw-r--r-- | dev-vcs/git-filter-repo/files/git-filter-repo-2.38.0-new-git.patch | 30 | ||||
-rw-r--r-- | dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r3.ebuild (renamed from dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r2.ebuild) | 10 |
2 files changed, 39 insertions, 1 deletions
diff --git a/dev-vcs/git-filter-repo/files/git-filter-repo-2.38.0-new-git.patch b/dev-vcs/git-filter-repo/files/git-filter-repo-2.38.0-new-git.patch new file mode 100644 index 000000000000..d54c6a7f8223 --- /dev/null +++ b/dev-vcs/git-filter-repo/files/git-filter-repo-2.38.0-new-git.patch @@ -0,0 +1,30 @@ +https://github.com/newren/git-filter-repo/issues/523 +https://github.com/newren/git-filter-repo/pull/526 + +From 1db1650e6e14443a5a8163213434aec5e190f193 Mon Sep 17 00:00:00 2001 +From: Vladimir Petko <vladimir.petko@canonical.com> +Date: Fri, 8 Dec 2023 15:05:34 +1300 +Subject: [PATCH] support git 2.43 + +Git 2.43 changes --mark-tags to --[no-]mark-tags and --reencode to --[no-]reencode. Use both options for the detection check. + +Signed-off-by: Vladimir Petko <vladimir.petko@canonical.com> +--- a/git-filter-repo ++++ b/git-filter-repo +@@ -2067,13 +2067,13 @@ EXAMPLES + if b'--anonymize-map' not in output: # pragma: no cover + global date_format_permissive + date_format_permissive = False +- if b'--mark-tags' not in output: # pragma: no cover ++ if not any(x in output for x in [b'--mark-tags',b'--[no-]mark-tags']): # pragma: no cover + global write_marks + write_marks = False + if args.state_branch: + # We need a version of git-fast-export with --mark-tags + raise SystemExit(_("Error: need git >= 2.24.0")) +- if b'--reencode' not in output: # pragma: no cover ++ if not any(x in output for x in [b'--reencode', b'--[no-]reencode']): # pragma: no cover + if args.preserve_commit_encoding: + # We need a version of git-fast-export with --reencode + raise SystemExit(_("Error: need git >= 2.23.0")) + diff --git a/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r2.ebuild b/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r3.ebuild index c54f9866d9bd..fe82886559bc 100644 --- a/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r2.ebuild +++ b/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r3.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10..11} ) +PYTHON_COMPAT=( python3_{10..12} ) inherit distutils-r1 DESCRIPTION="Quickly rewrite git repository history (filter-branch replacement)" @@ -27,6 +27,14 @@ BDEPEND=" # requires a valid source of version info, this one is for distros export SETUPTOOLS_SCM_PRETEND_VERSION=${PV} +python_prepare_all() { + cd .. || die + eapply "${FILESDIR}"/git-filter-repo-2.38.0-new-git.patch + cd "${S}" || die + + distutils-r1_python_prepare_all +} + python_test() { cd .. || die bash t/run_tests || die |