Update to 5.2

- Mercurial port is now much more stable on Python3 than before;
  still some issues can be discovered regarding the Python3
- Relates: #1737931
This commit is contained in:
Petr Stodulka 2019-11-25 13:02:26 +01:00
parent 3ba678b437
commit 6a90d19610
5 changed files with 16 additions and 21 deletions

1
.gitignore vendored
View File

@ -64,3 +64,4 @@ mercurial-1.6.2.tar.gz
/contrib-hg-ssh.patch /contrib-hg-ssh.patch
/mercurial-4.9.tar.gz /mercurial-4.9.tar.gz
/mercurial-5.1.2.tar.gz /mercurial-5.1.2.tar.gz
/mercurial-5.2.tar.gz

View File

@ -15,7 +15,7 @@ index 99556ce..5e30421 100644
--- a/setup.py --- a/setup.py
+++ b/setup.py +++ b/setup.py
@@ -207,6 +207,8 @@ def write_if_changed(path, content): @@ -207,6 +207,8 @@ def write_if_changed(path, content):
fh.write(content)
scripts = ['hg'] scripts = ['hg']
+if 'HGPYTHON3' in os.environ: +if 'HGPYTHON3' in os.environ:

View File

@ -1,13 +0,0 @@
diff --git a/hgext/hgk.py b/hgext/hgk.py
index 3da626e..61239e8 100644
--- a/hgext/hgk.py
+++ b/hgext/hgk.py
@@ -335,7 +335,7 @@ def revtree(ui, args, repo, full="tree", maxnr=0, parents=False):
('[OPTION]... REV...'))
def revlist(ui, repo, *revs, **opts):
"""print revisions"""
- if opts['header']:
+ if opts[u'header']:
full = "commit"
else:
full = None

View File

@ -1,7 +1,7 @@
Summary: Mercurial -- a distributed SCM Summary: Mercurial -- a distributed SCM
Name: mercurial Name: mercurial
Version: 5.1.2 Version: 5.2
Release: 2%{?dist} Release: 1%{?dist}
# Release: 1.rc1%%{?dist} # Release: 1.rc1%%{?dist}
@ -14,7 +14,6 @@ URL: http://www.selenic.com/mercurial/
Source0: http://www.selenic.com/mercurial/release/%{name}-%{upstreamversion}.tar.gz Source0: http://www.selenic.com/mercurial/release/%{name}-%{upstreamversion}.tar.gz
Source1: mercurial-site-start.el Source1: mercurial-site-start.el
Patch0: contrib-hg-ssh.patch Patch0: contrib-hg-ssh.patch
Patch1: hgk_python3.patch
Patch2: 0001-setup-hg3.patch Patch2: 0001-setup-hg3.patch
BuildRequires: python2 python2-devel bash-completion BuildRequires: python2 python2-devel bash-completion
BuildRequires: emacs-nox emacs-el pkgconfig gettext python2-docutils BuildRequires: emacs-nox emacs-el pkgconfig gettext python2-docutils
@ -46,7 +45,8 @@ BuildRequires: emacs-nox emacs-el pkgconfig gettext python3-docutils
Requires: %{name}-lang = %{version}-%{release} Requires: %{name}-lang = %{version}-%{release}
%description py3 %description py3
Subpackage with mercurial for Python3. This is beta version with own problems. Subpackage with mercurial for Python3. It's expected to be obsoleted when
dependent packages are prepared to use Python3 by default.
%package hgk %package hgk
@ -89,13 +89,14 @@ Locales for mercurial.
# NOTE: Use PYTHON envar instead of pathing Makefiles # NOTE: Use PYTHON envar instead of pathing Makefiles
# sed -ri 's|python\b|python2|' %{_builddir}/%{name}-%{version}/Makefile %{_builddir}/%{name}-%{version}/doc/Makefile # sed -ri 's|python\b|python2|' %{_builddir}/%{name}-%{version}/Makefile %{_builddir}/%{name}-%{version}/doc/Makefile
%patch0 -p1 -b .contrib-hg-ssh %patch0 -p1 -b .contrib-hg-ssh
# NOTE: The patch1 cannot be applied here as it has to be kept as it is for py2 version..
# %%patch1 -p1 -b .hgk_python3
%patch2 -p1 -b .create_hg3 %patch2 -p1 -b .create_hg3
%build %build
# copy hg to hg3 to be able to create /usr/bin/hg3 script # copy hg to hg3 to be able to create /usr/bin/hg3 script
cp -a hg hg3 cp -a hg hg3
# HGPYTHON3 is not needed since mercurial 5.2 for building & installation, but
# let's keep it for now as we can use is simply to create HG3 executable. Can
# be dropped with -py3 subpackage
PYTHON=%{__python3} HGPYTHON3=1 make all PYTHON=%{__python3} HGPYTHON3=1 make all
PYTHON=%{__python2} make all PYTHON=%{__python2} make all
@ -219,6 +220,12 @@ grep -v locale %{name}3-base.files > %{name}3-base-filtered.files
%changelog %changelog
* Mon Nov 25 2019 Petr Stodulka <pstodulk@redhat.com> - 5.2-1
- Update to 5.2
- Mercurial port is now much more stable on Python3 than before;
still some issues can be discovered regarding the Python3
- Relates: #1737931
* Sat Oct 19 2019 Petr Stodulka <pstodulk@redhat.com> - 5.1.2-2 * Sat Oct 19 2019 Petr Stodulka <pstodulk@redhat.com> - 5.1.2-2
- first attempt to create builds for py2 & py3 version - first attempt to create builds for py2 & py3 version
- separate lang into the own subpackage as files are shared between - separate lang into the own subpackage as files are shared between

View File

@ -1 +1 @@
SHA512 (mercurial-5.1.2.tar.gz) = a8ce9d9220a5ddf452264801f06e81fe1e699ff700d085e3f82c6877910c6ef0e594203590f198b7b9e31c9a1ed627c8fa2a3a1513d0c5087cf775835a78c408 SHA512 (mercurial-5.2.tar.gz) = c6437f09e852c597f15ecb2445e000db4673718190504e2336367a01655be76e9f95af53e4d09a81596cb5f1f6b32524132798430e2543e1931f3edb8bbe42b2