#6 Rebase to v5.2
Merged 5 months ago by pstodulk. Opened 5 months ago by pstodulk.
rpms/ pstodulk/mercurial master  into  master

file modified
+1

@@ -64,3 +64,4 @@ 

  /contrib-hg-ssh.patch

  /mercurial-4.9.tar.gz

  /mercurial-5.1.2.tar.gz

+ /mercurial-5.2.tar.gz

file modified
+1 -1

@@ -15,7 +15,7 @@ 

  --- a/setup.py

  +++ b/setup.py

  @@ -207,6 +207,8 @@ def write_if_changed(path, content):

-              fh.write(content)

+  

   

   scripts = ['hg']

  +if 'HGPYTHON3' in os.environ:

file removed
-13

@@ -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

file modified
+12 -5

@@ -1,6 +1,6 @@ 

  Summary: Mercurial -- a distributed SCM

  Name: mercurial

- Version: 5.1.2

+ Version: 5.2

  Release: 1%{?dist}

  

  # Release: 1.rc1%%{?dist}

@@ -14,7 +14,6 @@ 

  Source0: http://www.selenic.com/mercurial/release/%{name}-%{upstreamversion}.tar.gz

  Source1: mercurial-site-start.el

  Patch0: contrib-hg-ssh.patch

- Patch1: hgk_python3.patch

  Patch2: 0001-setup-hg3.patch

  BuildRequires: python2 python2-devel bash-completion

  BuildRequires: emacs-nox emacs-el pkgconfig gettext python2-docutils

@@ -46,7 +45,8 @@ 

  Requires: %{name}-lang = %{version}-%{release}

  

  %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

@@ -89,13 +89,14 @@ 

  # NOTE: Use PYTHON envar instead of pathing Makefiles

  # sed -ri 's|python\b|python2|' %{_builddir}/%{name}-%{version}/Makefile %{_builddir}/%{name}-%{version}/doc/Makefile

  %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

  

  %build

  # copy hg to hg3 to be able to create /usr/bin/hg3 script

  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=%{__python2} make all

  

@@ -219,6 +220,12 @@ 

  

  

  %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

  - first attempt to create builds for py2 & py3 version

  - separate lang into the own subpackage as files are shared between

file modified
+1 -1

@@ -1,1 +1,1 @@ 

- SHA512 (mercurial-5.1.2.tar.gz) = a8ce9d9220a5ddf452264801f06e81fe1e699ff700d085e3f82c6877910c6ef0e594203590f198b7b9e31c9a1ed627c8fa2a3a1513d0c5087cf775835a78c408

+ SHA512 (mercurial-5.2.tar.gz) = c6437f09e852c597f15ecb2445e000db4673718190504e2336367a01655be76e9f95af53e4d09a81596cb5f1f6b32524132798430e2543e1931f3edb8bbe42b2

Rebase to v5.2 where the Python3 support is marked as stable now. Despite some existing issues, it seems better than previous version. They removed some ugly hacks introduced in 5.1 for beta support of Python3. There are known issues in mercurial around Python 3.8, which seems to be fixed at least partially with the next version of mercurial.

I dropped one of the patches that seems obsoleted regarding the changes in v5.2 - and which we couldn't use anyway because of Py2+Py3 compatibility.

2 new commits added

  • Update to 5.2
  • bump release
5 months ago

Let's ship this. If it is broken, we can fix it later.

JFYI I'm trying to prep the alternatives. But don't block this PR on that.

Ok. Thanks for help, I am going to ship this.

Pull-Request has been merged by pstodulk

5 months ago

Tried building on F31. Builds OK.
But don't know about install.


sudo dnf install mercurial-py3-5.2-1.fc31.x86_64.rpm
Last metadata expiration check: 0:07:51 ago on Tue 26 Nov 2019 07:16:26 AM EST.
Error:
Problem 1: conflicting requests
- nothing provides mercurial-lang = 5.2-1.fc31 needed by mercurial-py3-5.2-1.fc31.x86_64


OK, how about:
sudo dnf install mercurial-py3-5.2-1.fc31.x86_64.rpm mercurial-lang-5.2-1.fc31.x86_64.rpm
Last metadata expiration check: 0:08:09 ago on Tue 26 Nov 2019 07:16:26 AM EST.
Dependencies resolved.
==========================================================================================================================================
Package Architecture Version Repository Size
==========================================================================================================================================
Installing:
mercurial-py3 x86_64 5.2-1.fc31 @commandline 3.5 M
mercurial-lang x86_64 5.2-1.fc31 @commandline 1.0 M

Transaction Summary

Install 2 Packages

Total size: 4.5 M
Installed size: 21 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction test error:
file /usr/share/locale/da/LC_MESSAGES/hg.mo from install of mercurial-lang-5.2-1.fc31.x86_64 conflicts with file from package mercurial-4.9-2.fc31.x86_64...
[ all mercurial-lang files conflict...]

mercurial-lang must add:

Conflicts:  mercurial < %{version}-%{release}

That's weird. I mean - I built local packages for me on master branch (fc32) and I am able to install it (shortened outputs):

# dnf update mercurial-*
...
Dependencies resolved.
==============================================================================================================================================================================================================================================
 Package                                                      Architecture                                         Version                                                   Repository                                                  Size
==============================================================================================================================================================================================================================================
Upgrading:
 mercurial                                                    x86_64                                               5.2-1.fc32                                                @commandline                                               4.5 M
 mercurial-hgk                                                x86_64                                               5.2-1.fc32                                                @commandline                                                44 k
Installing dependencies:
 mercurial-lang                                               x86_64                                               5.2-1.fc32                                                @commandline                                               1.0 M

Transaction Summary
==============================================================================================================================================================================================================================================
Install  1 Package
Upgrade  2 Packages

Total size: 5.6 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
...
# dnf install mercurial-py3-5.2-1.fc32.x86_64.rpm
Last metadata expiration check: 0:01:20 ago on Út 26. listopadu 2019, 13:33:41 CET.
Dependencies resolved.
==============================================================================================================================================================================================================================================
 Package                                                     Architecture                                         Version                                                    Repository                                                  Size
==============================================================================================================================================================================================================================================
Installing:
 mercurial-py3                                               x86_64                                               5.2-1.fc32                                                 @commandline                                               4.1 M

Transaction Summary
==============================================================================================================================================================================================================================================
Install  1 Package

Total size: 4.1 M
Installed size: 16 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
...
# rpm -qa "*mercurial*"
mercurial-hgk-5.2-1.fc32.x86_64
mercurial-py3-5.2-1.fc32.x86_64
mercurial-lang-5.2-1.fc32.x86_64
mercurial-5.2-1.fc32.x86_64

Probably I am missing something. ... ah. I see another thing. I updated from mercurial 5.1-5. I will try it again later with the original fedora builds.

EDIT: later == deep night or thursday's night.

You install mercurial. try installing only mercurial-py3 while you have older mercurial installed.

The mercurial package now requires both /usr/bin/python2 and /usr/bin/python3. /usr/bin/hg-ssh is to blame. I have addressed that in https://src.fedoraproject.org/rpms/mercurial/pull-request/7