From 58dc6bb36a79726ca510aab470bf32d8e9876689 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Sat, 10 Oct 2020 11:23:56 -0400 Subject: [PATCH] adjust python hashbang in contrib/hg-to-git, it supports python3 The hg-to-git.py script in contrib grew python3 support in upstream commit d17ae00c97 (hg-to-git: make it compatible with both python3 and python2, 2019-09-18), which was released in git-2.24.0. Move it from the python2-only conditionals. (This leaves contrib/fast-import/import-zips.py as the sole python script which is _not_ python3-compatible. It seems to need only minimal fixes for python2/python3 compatibility -- per some light testing.) --- git.spec | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/git.spec b/git.spec index c90480c..dd071c6 100644 --- a/git.spec +++ b/git.spec @@ -634,21 +634,21 @@ export SOURCE_DATE_EPOCH=$(date -r version +%%s 2>/dev/null) %if %{with python2} sed -i -e '1s@#! */usr/bin/env python$@#!%{__python2}@' \ contrib/fast-import/import-zips.py \ - contrib/hg-to-git/hg-to-git.py \ contrib/hooks/multimail/git_multimail.py \ contrib/hooks/multimail/migrate-mailhook-config \ contrib/hooks/multimail/post-receive.example %else -# Remove contrib/fast-import/import-zips.py and contrib/hg-to-git which all -# require python2. -rm -rf contrib/fast-import/import-zips.py contrib/hg-to-git +# Remove contrib/fast-import/import-zips.py which requires python2. +rm -rf contrib/fast-import/import-zips.py %endif # endif with python2 # The multimail hook is installed with git. Use python3 to avoid an -# unnecessary python2 dependency, if possible. +# unnecessary python2 dependency, if possible. Also fix contrib/hg-to-git +# while here. %if %{with python3} sed -i -e '1s@#!\( */usr/bin/env python\|%{__python2}\)$@#!%{__python3}@' \ + contrib/hg-to-git/hg-to-git.py \ contrib/hooks/multimail/git_multimail.py \ contrib/hooks/multimail/migrate-mailhook-config \ contrib/hooks/multimail/post-receive.example @@ -1079,6 +1079,7 @@ rmdir --ignore-fail-on-non-empty "$testdir" * Fri Oct 09 2020 Todd Zullinger - 2.29.0-0.1.rc1 - update to 2.29.0-rc1 - drop emacs-git stub for fedora >= 34 (#1882360) +- adjust python hashbang in contrib/hg-to-git, it supports python3 * Mon Oct 05 2020 Todd Zullinger - 2.29.0-0.0.rc0 - update to 2.29.0-rc0