Patchwork [STABLE] hghave: deal with "rc" release

login
register
mail settings
Submitter Pierre-Yves David
Date April 25, 2019, 7:19 p.m.
Message ID <fcaf2e87d89a2f4b12df.1556219991@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/39833/
State Accepted
Headers show

Comments

Pierre-Yves David - April 25, 2019, 7:19 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1556212622 -7200
#      Thu Apr 25 19:17:02 2019 +0200
# Branch stable
# Node ID fcaf2e87d89a2f4b12dfde47c29183a04436c442
# Parent  ae68418cc3a1a01f7d33f9bad6a3f016d31c544c
# EXP-Topic hghave
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r fcaf2e87d89a
hghave: deal with "rc" release

Without this change, 5.0rc0 is not recognised as 5.0
Yuya Nishihara - April 28, 2019, 8:49 a.m.
On Thu, 25 Apr 2019 21:19:51 +0200, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@octobus.net>
> # Date 1556212622 -7200
> #      Thu Apr 25 19:17:02 2019 +0200
> # Branch stable
> # Node ID fcaf2e87d89a2f4b12dfde47c29183a04436c442
> # Parent  ae68418cc3a1a01f7d33f9bad6a3f016d31c544c
> # EXP-Topic hghave
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r fcaf2e87d89a
> hghave: deal with "rc" release

Queued for stable, thanks.

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -142,7 +142,7 @@  def has_bzr():
 
 @checkvers("bzr", "Canonical's Bazaar client >= %s", (1.14,))
 def has_bzr_range(v):
-    major, minor = v.split('.')[0:2]
+    major, minor = v.split('rc')[0].split('.')[0:2]
     try:
         import bzrlib
         return (bzrlib.__doc__ is not None